Fre*_*Boy 60 asp.net cookies forms-authentication
我可以更改FormsAuthentication cookie名称吗?
如果是,怎么样?
我得到的问题是,当我有两个Web应用程序部署在同一个域中时,当有人登录时,第二个将自动注销,因为他们使用相同的身份验证的cookie名称.
two*_*wer 88
您可以在web.config文件中进行调整:
<authentication mode="Forms">
<forms name=".CookieName" loginUrl="LoginPage.aspx" />
</authentication>
Run Code Online (Sandbox Code Playgroud)
Waq*_*aja 14
是的,您可以web.config在forms元素下的authentication元素上指定cookie名称.
<authentication mode="Forms">
<forms name="RoleBasedAuthenticationCookiename" loginUrl="~/Login.aspx" defaultUrl="~/Default.aspx">
</forms>
</authentication>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
26715 次 |
| 最近记录: |