• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2349
  • Last Modified:

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

I am trying to set up my intranet to use some aspx pages. I am able to view the aspx pages from any browser on the intranet but when I try to access any dynamic data it errors out with:

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:
[SqlException (0x80131904): Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
   System.Data.ProviderBase.DbConnectionPool.GetConnection(Object owningObject) +317
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnectionBase owningConnection) +90

I have set the authentication to sql and windows(mixed mode)
I added the IUSR account that the IIS server is using to access the webpage to the database users.
Windows 2003 server, intranet IIS and sql are running on the same server, ASP.NET 2.0..

Help???

0
uyht
Asked:
uyht
  • 3
1 Solution
 
alimuCommented:
what's the connection string you're currently using (xxx out any passwords)?
0
 
uyhtAuthor Commented:
connectionString="Server=zion;Integrated Security=True;Database=ePO_ZION;Persist Security Info=True" providerName="System.Data.SqlClient"

I think that is the connection string but there are no passwords...I am using the visual web developer program to write the aspx code. I took this line from the web.config file for the site
0
 
alimuCommented:
you've said that your sql and IIS are on the same server,
try changing these:
Server=local;
Integrated Security=SSPI

Your website according to the configuration you've set above for iusr_machinename account should be setup to use Anonymous Access.
If the users are instead coming through using Integrated or Basic you'll need to setup these userids as valid SQL users with access to the ePO_ZION database.
let me know if it sorts it out.
AJ.
0
 
alimuCommented:
thanks for the points!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now