Hello,
My application is having a problem connecting to its database. The error I am getting is below...
Can anyone give me a pointer on how to fix the problem... I am guessing I need to increase the authentication or change how the database is accessed?
thanks
Cannot open user default database. Login failed.
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: Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
Hi,
This means that your ASPNET worker ('NT AUTHORITY\NETWORK SERVICE')does not have access to your datasource.
If you are using SQL Server, there stages of the SQL server access which you have to set in your SQL Server:
1. Add login users in your SQL Server (add your ASPNET worker)
2. Grant access to database to this
3. Grant access to dabase object (Stored procs, tables, etc)
I hope this helps.
Cheers,
Wilmar, KSA (Mabuhay!)