Last post Jul 17, 2012 09:41 AM by stuartm9999
Jul 10, 2012 11:58 AM|bluenose19700|LINK
Going round in circles trying to sort this...
I have a ASP.NET C# application connecting to a SQL 2008 Server, within my web.config I have the following:
Initial Catalog=MYDB;Data Source=MYSERVER;Trusted_Connection=Yes;
Running this via localhost the app runs without any issues, BUT - running from another PC generates the following error:
"Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'"
Basically I want to use Windows Authentication for connecting to SQL Server.
Any suggestion/help greatly received.
Jul 10, 2012 12:15 PM|Mudasir.Khan|LINK
have you logged in using domain credentials
please check whether sql server instance enabled with Windows Authenticated
Jul 10, 2012 12:29 PM|bluenose19700|LINK
Yes, using domain credentials. Windows authentication is enabled.
Jul 10, 2012 12:41 PM|devsolutions|LINK
Jul 10, 2012 01:39 PM|bluenose19700|LINK
Thanks for the links but they don't cover the error that I'm getting...
Jul 10, 2012 03:03 PM|sukumarraju|LINK
Jul 10, 2012 03:35 PM|AccuWebHosting.Com|LINK
I think you should try with SQL Server Authentication.
Jul 17, 2012 09:41 AM|stuartm9999|LINK
The asp.net worker process runs in a local windows account. To use windows authentication you will need to set up a domain account (service account that does not have password expiration) and set the iis worker process to run in this account (granting it
appropriate privilages on the server). You can then give this domain account appropriate sql privilages.
As pointed out by others, it is propably easier to use sql authentication, creating a new sql login, putting the sql credentials in the web.config (they can be encrypted) and granting appropriate permissions on your database (usually execute on stored procedures).