From what I can see, I enable/disable windows auth from the project settings and it seems to override when I am running in VS.
If I deploy out to a server, does IIS use my web.config settings or does it use IIS settings for windows auth?
What are the settings for each and how does it affect windows auth in:
- Project level
- IIS Express level
- IIS
CodePudding user response:
web.config is a file that is read by IIS or IIS Express or the new ASP.NET Core Modules. If there is same setting set/ define in both IIS or web.config, the setting in web.config wins.
For project settings, it is an UI that is provided by VS to conveniently for example adding connection string. Try to add new connection string, it will be added to web.config as well. If existing connection string or other setting which has the same key but different value, web.config wins.
You can try this with the same connection string. use user and password, then change the project setting's connection string with false password. It should still running OK, cause the one that is being read is the web.config