<?xml version="1.0"?><configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
<authentication mode="Forms">
<forms loginUrl="login.aspx" name=".ASPXAUTH1" domain=".cnblogs.com" />
</authentication>
<machineKey validationKey="F9A61F796A204D9945889B64D9DA5086E89CEC5200F0CED4" decryptionKey="D679BCF2A76DEBB04D7FED5E5967F46C92FEF2B31AD5D7C9" validation="SHA1" />
<compilation debug="true"/>
<roleManager defaultProvider="MyRoleProvider"
enabled="true"
cacheRolesInCookie="true"
cookieName=".ASPROLES"
cookieTimeout="30"
cookiePath="/"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
cookieProtection="All" >
<providers>
<clear />
<add name="MyRoleProvider"
type="MyRoleProvider"
writeExceptionsToEventLog="false" />
</providers>
</roleManager>
</system.web>
<location path="admin">
<system.web>
<authorization>
<allow roles="Admins"/>
<deny users="*"/>
</authorization>
</system.web>
</location>
</configuration>
Asp.Net Forms验证文章中最后的web.config文件
最新推荐文章于 2024-08-28 23:30:26 发布