且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

设置登录时间(会员资格和授权)

更新时间:2023-12-05 08:29:28

您可以在以下位置使用成员资格提供程序类您的应用程序,并向您添加以下代码web.config

you can use the membership provider class in your application and add the following code to you web.config

<authentication mode="Forms">
   <forms loginUrl="Login.aspx"

          protection="All"

          timeout="30"

          name="AppNameCookie"

          path="/FormsAuth"

          requireSSL="false"

          slidingExpiration="true"

          defaultUrl="default.aspx"

          cookieless="UseCookies"

          enableCrossAppRedirects="false" />
</authentication>




这里的超时期限将设置您的登录持续时间.



让我知道您是否还有其他需要.




here timeout period willset your login duration.



Let me know if you need anything else regarding it.