Showing posts with label connectionstring. Show all posts
Showing posts with label connectionstring. Show all posts

Wednesday, March 28, 2012

Login failed for user ?

Im having trouble to connect to my database server, im using this connectionstring.

<addname="LocalSqlServer"connectionString="Data Source=.;Initial Catalog=aspnetdb;Integrated Security=True"providerName="System.Data.SqlClient" />
But i always get this error,

Login failed for user ''. The user is not associated with a trusted SQL Server connection.
As u can see there is no user? the aspnet_wp.exe is running with my active ASPNET user, i don't know what's wrong here.

Try this
<addkey="ConnString"value="Database=databaseName; Server=serverName; uid=myUserName_writer; pwd=myPasswordr; Persist Security Info=True"/>

where 'uid' and 'pwd' are username and password for your Sql Server.

HTH

|||Try this one :
<addname="LocalSqlServer"connectionString="Data Source=.;Initial Catalog=aspnetdb;Integrated Security=True";Trusted_Connection=Yes;providerName="System.Data.SqlClient" />

Monday, March 12, 2012

login fail for user-- help

hi,
i got this error--

Login failed for user 'MERIDIAN\IUSR_BARODA'.
.Net SqlClient Data Provider
---

what should i do?

my connectionstring is
--
conn.ConnectionString = "workstation id=BARODA;packet size=4096;integrated security=SSPI;data source=BARODA\EMIS;persist security info=True;initial catalog=SMS"
--
i also create 'MERIDIAN\IUSR_BARODA' user.

give any solution.
it's urgent.

thanks in advanceThis is a windows account, right? impersonate the web application by supplying the user id and password for the <identity> element in the web.config.

Brian