.net Access Forms authentication “timeout” value in code

后端 未结 6 1566
小蘑菇
小蘑菇 2021-02-09 18:39

I\'m adding a logout expiration alert to my application and would like to access my web.config forms authentication \"timeout\" value from my code. Any way i could do this?

6条回答
  •  北荒
    北荒 (楼主)
    2021-02-09 19:35

    You can access the web.config's timeout value in:

    FormsAuthentication.Timeout.TotalMinutes

    I don't know since when it's available, I'm using .NET 4.5.

提交回复
热议问题