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" />

No comments:

Post a Comment