62,160
社区成员
发帖
与我相关
我的任务
分享
Page.Session.Add( "user", user );
Response.Redirect( "Welcome.aspx");
String me = Session["user"].ToString();
customerid = me.FormId;
if(me == "") {
Response.Redirect( "Login.aspx");
}
if (Request.QueryString["ReturnUrl"] != null)
{
FormsAuthentication.RedirectFromLoginPage(username, false);
}
else
{
FormsAuthentication.SetAuthCookie(username, false);
Response.Redirect("admin/main.aspx",false);
}
<authorization>
<allow users="*" />
</authorization>-->
<authentication mode="Forms">
<forms loginUrl="~/Logon.aspx" protection="All" timeout="30" name=".ASPXAUTH" path="/" requireSSL="false" slidingExpiration="true" cookieless="UseDeviceProfile" enableCrossAppRedirects="false" />这里是返回登陆的页面
</authentication>
</system.web>
<location path="admin"> 这里是要登陆才能进去的文件夹名字
<system.web>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
</system.web>
</location>
<!--<authorization>
<allow users="*" />
</authorization>-->
<!--<authentication mode="Forms">
--><!--<forms loginUrl="~/Logon.aspx" timeout="20" name=".ASPXSYSTEM" protection="All"/>--><!--
<forms loginUrl="~/Logon.aspx" protection="All" timeout="30" name=".ASPXAUTH" path="/" requireSSL="false" slidingExpiration="true" cookieless="UseDeviceProfile" enableCrossAppRedirects="false" />
</authentication>-->
</system.web>
<!--<location path="admin"> 这里是要登陆才能进去的文件夹名字
<system.web>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
</system.web>
</location>-->