Programmed by FormsAuthentication.FormsCookieName

Is it possible to set FormsAuthentication.FormsCookieName in Codebehind (fe in Global.asax)? All the properties that I saw that lead to this configuration parameter are readonly.

Thanks in advance.

+3
source share
1 answer

Just by reading the link you provided, it seems that you can only install it in the configuration section:

The value of the FormsCookieName property is set in the ASP.NET application configuration file using the name attribute of the form configuration element.

<authentication mode="Forms">
  <forms loginUrl="member_login.aspx"
    cookieless="UseCookies"
    name=".ASPXFORMSAUTH" />
</authentication>

Also, does this property allow you to "get" the name correctly?

So, I guess the answer is No.

+2

Source: https://habr.com/ru/post/1784603/


All Articles