Hi,
I created released version of .NET Core application and hosted to IIS under Default WebSite. IIS and SQL Server are different machines.
Application hosted smoothly using Publish features of Visual studio and it works fine as long as it doesn't require database connection.
but when it tries to connects to SQL server , it gives the errors.
Interestingly, It works fine using Visual Studio IIS Express but does not work when hosted on IIS.
This is what is did on IIS, application based on
https://docs.asp.net/en/latest/publishing/iis.html
IIS :
Enable Windows Authentication
Application Pool : No Managed Code
Identity(for application pool) : Local System [it does not work NetworkService or any other]
Application:
In launchSetting ,
windowsAuthentication : true
anonymousAuthentication:false
ConnectionString:
Server=myDifferentServer.myDomain;Database=myDatabase;Trusted_Connection=True
2 questions,
1- Why hosted application does not work when it tries to connect database ?
2- Is it Buil-in account "LocalSystem" causing the problem?
Any tutorial on it or feedback?
Regard,
S