Thursday, April 21, 2011

error occurred when run site

this error occurred when run site

Login failed for user 'NT AUTHORITY\NETWORK SERVICE

From stackoverflow
  • Sorry I solved It The Connection string information wasn't right

  • You may need to create the user and give them permission to your database.

    You can do this under Security in SQL Server Management Studio or create a SQL query and paste the following in:

    USE [DBNAME];
    CREATE USER [NT AUTHORITY\NETWORK SERVICE] FOR LOGIN [NT AUTHORITY\NETWORK SERVICE]
    GO
    

    You may also need to add them to a role like this:

    USE [DBNAME];
    EXEC sp_addrolemember N'db_owner', N'NT AUTHORITY\NETWORK SERVICE'
    GO
    

0 comments:

Post a Comment