Disable authentication on subfolder(s) of an ASP.NET app using windows authentication

12,274

You can control authentication using the location tag in the web.config, or, put another web.config in to the relevant subfolder specifying the settings you need applying.

You can also control access to resources (folders or individual files) within IIS hence you'll need to make sure you don't have conflicting rules in place.

Share:
12,274

Related videos on Youtube

Admin
Author by

Admin

Updated on September 17, 2022

Comments

  • Admin
    Admin over 1 year

    Is it possible to disable windows authentication on one or more subfolders of an ASP.net application using windows authentication?

    For example:

    A website contains several other folders that contain parts of the overall application: /frontend, /backend, /login

    The bin folder is on the same level as these subfolder, i.e. the root of the website.

    All of these subfolders contain pages that use binaries that reside in the bin folder of the root of the website.

    The user must input windows credentials when visiting a page in the backend folder, but not when visiting a page in the login or frontend folder.

    I'm using IIS7

    Any ideas?

  • Admin
    Admin about 14 years
    I've tried adding location tags to the web.config and using seperate web.config files), but both do no seem to work. <location path="login"> <system.web> <authorization> <allow users="*" /> </authorization> <identity impersonate="false" /> </system.web> </location>
  • Admin
    Admin about 14 years
    Thx for your help, found a solution using location tags