Programmatically set FormsAuthentication.FormsCookieName
is it possible to set the FormsAu开发者_Python百科thentication.FormsCookieName in Codebehind(f.e. in Global.asax)? All properties that i have seen that lead to this config-parameter are readonly.
Thank you in advance.
Just reading the link you provided it seems that you can only set it in the configuration section:
The FormsCookieName property value is set in the configuration file for an ASP.NET application by using the name attribute of the forms configuration element.
<authentication mode="Forms">
<forms loginUrl="member_login.aspx"
cookieless="UseCookies"
name=".ASPXFORMSAUTH" />
</authentication>
Also, that property only let's you "get" the name right?
So I'm assuming the answer is No.
精彩评论