Authentication Config within an Application

Discussion in 'ASP.NET / ASP.NET Core' started by davidseye, May 3, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I am building an app that does not require authentication for the main process, only if the user selects to go into a certain part of the application, contained in a sub-directory of the application.

    My problem.
    If I put authentication in the web config file at the application's root it wants to authenticate every user that enters. When I put authentication in a web.config in the sub-directory, an error is generated that says that authentication cannot exist out of the application level, because 'allowDefinition="MachineToApplication'. I changed the value to "Everywhere" in the machine.config file in the root of the .Net Framework but I got the error that it cannot be set for a subdirectory.

    My question:
    How do I use authentication in a sub-directory of an application only?
     
  2. I worked it out. I thought that making the sub-directory an application root would solve the problem but though I did it did not seem to work. I gave the sub-directory it's own app name. When I tried it again I gave the sub-application root a name with the application name in it 'application/subapplication' and it worked.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page