Last post Jul 31, 2018 10:49 AM by DA924
Jul 29, 2018 04:49 PM|GaelB|LINK
Hi, I want to publish an asp.mvc web application on the local IIS server, just for a test question. The server sql database used with visual studio is without a password.After publishing my application, the following message is displayedFailed to log in to 'NT AUTHORITY \ System' userI tried to search on the net but I did not find anything important, I am told that the server IIS can not connect with sql server.So I do not know what to do. how can I solve this problem?
Jul 30, 2018 07:28 AM|PatriceSc|LINK
Which IIS version ? It happens when using "integrated security". In this case the identity used to run the web app is used to connect to SQL Server. See ,https://docs.microsoft.com/en-us/iis/manage/configuring-security/application-pool-identities for
how to configure this identity.
A possible option is to create a dedicated domain account that you'll use to run each app and that will be used to connect to SQL Server. You could also grant access to this account (see for example https://www.codeproject.com/Articles/674930/Configuring-IIS-ASP-NET-and-SQL-Server)
but it means all apps configured this way could access this db.
Jul 31, 2018 08:11 AM|Deepak Panchal|LINK
For testing purpose, set the pool identity on LocalSystem. it might be preventing "NT AUTHRITY\SYSTEM" from opening a connection to database.
Let us know, Whether it worked on your side or not.
Jul 31, 2018 10:49 AM|DA924|LINK
All, you have to do is go to the database with SSMS and set the database to use the NT AUTHORITY account access so that it can access the database.
Do you even know what is really happening and what is presenting the credentials to MS SQL server on the behalf of your ASP.NET Web program, which is called the "Worker Process?