How to get the timeout of the Forms authentication from a client connecting through Client Application Services?
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.
精彩评论