ASP.NET 2.0 authentication

xiaoxiao2021-04-03  214

In ASP.NET 2.0, if the root directory allows anonymous user access, a page under the root directory (such as Info.aspx) must be logged in (assuming the login page is login.aspx) before access, the root directory of Web .config file must be configured such:

->

->

That is, the Authentication item cannot be configured in the page configuration section that needs to be authenticated, and can only configure the Authentication item in the root directory, inheritance from the root of the root. Otherwise, this error occurs: "Register outside the application level The section for the willdefinition = 'MachineToApplication' is wrong. If you do not configure the virtual directory as an application in IIS, this error may result.

Finally, the

转载请注明原文地址:https://www.9cbs.com/read-131523.html

New Post(0)