在asp.net的IE中,identity.name是空白的 [英] identity.name is blank in IE in asp.net

查看:102
本文介绍了在asp.net的IE中,identity.name是空白的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在登录页面使用以下代码进行表单身份验证。

系统.Web.Security.FormsAuthentication.SetAuthCookie(userId, false ); 





它适用于所有浏览器的暂存,但在生产中托管我试图访问登录,它在除IE之外的所有浏览器中都正常工作。



在IE中,登录页面中的httpcontext.current.user.identity.name值如预期,但从登录重定向后,其值为空。



请帮助我。

解决方案

尝试检查cookie的域名是什么(您可以在配置文件中找到)


使用Fiddler进一步调查。

Hi,

I am using following code for form authentication in login page.

System.Web.Security.FormsAuthentication.SetAuthCookie(userId, false);



It is working fine on staging with all browsers but After hosting in Production I am trying to access login, It is working fine in all browsers except IE.

In IE, httpcontext.current.user.identity.name value in login page is as expected but after redirecting from login, Its value is empty.

Please assist me.

解决方案

try to check what is cookies's domain name ( you may find in config file)


Use Fiddler to investigate further .


这篇关于在asp.net的IE中,identity.name是空白的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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