简体   繁体   中英

In ASP.Net what is the difference between Authentication in IIS and in web.config

I worked on a ASP.Net MVC 5 web application.

My web application is using Windows authentication, and I created a virtual directory to the web application on IIS.

There is an Authentication icon to configure the authentication via IIS, and it contains:

  • Anonymous Authentication: Enabled.
  • ASP.NET Impersonation: Disabled.
  • Forms Authentication: Disabled.

So where is the Windows authentication?

Now in web.config in find:

<authentication mode="Windows" />
<authorization>
   <!--<deny users="?" /> i know that to deny Anonymous -->
</authorization>

So what is the difference between the authentication settings in IIS and authentication in web.config ? I can do what I want using web.config so why the IIS authentication configurations?

you can add/remove some security features in the add enable/disable windows features in the control panel at the IIS section:

在此处输入图片说明

Now, when you change the authentication type in the IIS, those changes are persisted in the web.config file, for windows authentication the option is basic authentication:

在此处输入图片说明

PD: My OS is in spanish, so sorry for that.

Regards,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM