Friday, March 30, 2012

Login failed for user NT AUTHORITY\NETWORK SERVICE.

OK I know that this topic seems like it has been beaten to death in the forums but I'm still unable to figure out why I'm getting this error.

I've added the NT Authority\Network Service to the SQL server and the database that I want to connect to. I've made it the db_owner. Still got the error.

I added myself (the account I login with into windows) with the same options as with the NT Authority. Still got error.

I'm runnin SQL Server 2005 on my local machine as well as IIS 6. I know that my web.config is correct because I only started getting this error after I reinstalled SQL Server and IIS. I've really run out of ideas of why this is happening. I'm assuming from the error message that it's at the database level but I just don't know where.

Here are exerts from my web.config that may help:

<connectionStrings>

<removename="database"/>

<addname="database"connectionString="Data Source=(local);Initial Catalog=TheBugZoo;Integrated Security=True;"providerName="System.Data.SqlClient"/>

</connectionStrings>

<roleManagerenabled="true"cacheRolesInCookie="true"cookieName="TBZROLES"defaultProvider="TBZ_RoleProvider">

<providers>

<addconnectionStringName="database"applicationName="/"name="TBZ_RoleProvider"type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

</providers>

</roleManager>

Look at this KB article:http://support.microsoft.com/kb/316989|||

Hi,

Thanks for your reply. I ended up creating a user in the db and changing my connection string not to use the integrated security. This solved my problem but I still don't understand why I was having issues with the integrated security.

Thanks.

No comments:

Post a Comment