ArticleDirectory
We all know that identity authentication requirements for all pages are implemented using the following methods:
<Authentication mode = "forms">
<Forms name = ". onlinework" loginurl = "logoin. aspx" Protection = "all" timeout = "60"/>
</Authentication>
<Authorization>
<Deny users = "? "/>
</Authorization>
In the document "setting individual pages for authentication when setting form authentication does not require authentication", DDL points out that to configure a page independently, authentication is not required, however, the way to keep other pages requiring identity authentication is later on the web. add the corresponding page configuration in <configuration> of config. In fact, if there are more pages, this configuration may be a little troublesome.
We have encountered similar problems and found ASP. net has a feature that allows independent web under any directory. config file, and the Web. the Config File takes precedence over the web in the root directory. config file. In this way, we only need to store all the pages that do not require identity authentication in the directory and configure the web. the config file does not require identity authentication, and the page/directory that requires Identity Authentication coexist.
The opposite is true: the main directory does not require identity authentication. Some pages require identity authentication. Put the pages that require Identity Authentication in a directory, and then configure the Web. config of this directory to require identity authentication.