我可以改变FormsAuthentication饼干的名字吗? [英] Can I change the FormsAuthentication cookie name?

查看:196
本文介绍了我可以改变FormsAuthentication饼干的名字吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以更改FormsAuthentication cookie名称?

Can I change the FormsAuthentication cookie name?

如果是,如何?

我已经得到的问题是,当我有两个Web应用程序部署在那么相同的域时,任何人都那么第二个将被自动注销,因为它们使用相同的身份验证的cookie名字被记录下来。

The problem which I've got is that when I have two web applications are deployed in the same domain then when anyone is logged in then the second one will be automatically logged out because they use the same Authentication's cookie name.

推荐答案

您可以在web.config文件中进行调整:

You can adjust it in your web.config file:

<authentication mode="Forms">
  <forms name=".CookieName" loginUrl="LoginPage.aspx" />
</authentication>

这篇关于我可以改变FormsAuthentication饼干的名字吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆