开发者

How to get the timeout of the Forms authentication from a client connecting through Client Application Services?

开发者 https://www.devze.com 2022-12-11 17:09 出处:网络
I have an ASP.NET website configured with <authentication mode=\"Forms\"> <forms loginUrl=\"Login.aspx\" timeout=\"10080\">

I have an ASP.NET website configured with

<authentication mode="Forms">
    <forms loginUrl="Login.aspx" timeout="10080">
 开发者_Python百科   </forms>
</authentication>

and a WinForm app using Client Application Services for login. How can I find the "timeout" parameter from the WinForm app?


Also check:

http://www.hanselman.com/blog/AccessingTheASPNETFormsAuthenticationTimeoutValue.aspx


I can't remember if the cookie that ASP.NET sets as part of forms authentication has it's expiration date set to conicide with the actual session inactivity expiration, but if so, I believe this will be your only way to find out: have your client app subtract the current dateTime from the cookie's expiration date.

0

精彩评论

暂无评论...
验证码 换一张
取 消