Click here to Skip to main content
15,917,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear sir,

Login failed for user 'SystemName\IUSR_SystemName'. in sql server?
what can i do?

because error occur in my asp.net page
"Login failed for user 'SystemName\IUSR_SystemName'."

how to solve this problem?


Note: I Updated my database backup same system.



By mohan.
Posted

If you have recently restored a backup (if I understood your question correctly) then the problem may be that you have an nonexisting user (it wasn't in the backup) or if the user is existing and authenticated by SQL Server, then you may have old password (the one that was valid when the backup was made).
 
Share this answer
 
Are you using Windows Authentication in your connection string?

If so, when you deploy to a web server, when it attempts to connect to the SQL instance, it will use the account that the ASP.Net process is running under

Either...

1) Grant access to the account in your server \ databases

2) Configure the application to run under a different windows account. E.g. use an application pool with a configured identity & set your web application to run in that application pool

3) Change the connection string to use SQL Server security. Create an SQL user + password, grant access to the database and change your connection string accordingly.


Option 3) is fairly common & easy to implement.
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900