开发者

Programmatically set FormsAuthentication.FormsCookieName

开发者 https://www.devze.com 2023-02-04 13:18 出处:网络
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.

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.

0

精彩评论

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