ASP.net身份登录时2.0没有建立有效的验证 [英] ASP.net Identity 2.0 not creating a valid authentication when signing in

查看:96
本文介绍了ASP.net身份登录时2.0没有建立有效的验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有实现微软最新的身份2.0我ASP.net 4.5 Web窗体项目中的问题。这是我的情景......

I am having a problem implementing Microsoft's latest Identity 2.0 in my ASP.net 4.5 Web Forms project. This is my scenario...

我已经下载从 HTTPS最新Webforms.Samples code:// ASPNET。 codeplex.com / SourceControl /最新和pretty多进行直端口(用于测试目的)到我的项目。

I have downloaded the latest Webforms.Samples code from https://aspnet.codeplex.com/SourceControl/latest and pretty much performed a straight port (for the purposes of testing) into my project.

在发展中,code /实现正常工作,当我们迁移到我们的IIS 7.5临时服务器,经过一段时间后(通常是3或4个小时,但不同)的测试用户遇到以下问题..

In development, the code/implementation works correctly, when we move to our IIS 7.5 staging server, after a period of time (usually 3 or 4 hours, but varies) the test users experience the following problem...

当他们登录,在登录过程中出现的正常运行并重定向他们回到指定的返回URL,但授权不完整/认可,它们会立即返回到登录页面。

When they login, the login process appears to run correctly and redirects them back to the specified return url, but the authorisation is not complete/recognised and they get immediately returned back to the login page.

我应该说,在登录页面/过程不会失败(没有错误)和底层code返回成功(因为这是将调用重定向的唯一途径),但实际出现的机制是被动的。为了证明这一点,我创建了一个测试页面,简单地呼应了用户的身份,甚至一个显然成功登录后,立即,用户身份是匿名的。

I should say that the login page/process doesn't fail (no errors) and the underlying code return 'success' (as this is the only path that will invoke the redirect), but the actual mechanism appears to be passive. To prove this, I have created a test page that simply echoes the user's identity and even immediately after an apparently successful login, the user identity is anonymous.

我已经找到固定问题的唯一方法是重新启动Web应用程序,它再次运行一段时间的乐趣。

The only way I have found of fixing the issue is to restart the web application and again it runs fun for a while.

谁能给我,我可以看看,开始调试这个问题,或者任何指针是什么原因可能是?

Can anyone give me any pointers on where I can look to begin to debug this issue or what the cause might be?

感谢。

推荐答案

<一个href=\"http://stackoverflow.com/questions/20737578/asp-net-sessionid-owin-cookies-do-not-send-to-browser\">ASP.NET_SessionId 这似乎页面上创建应用程序会话提供一个解决方法对这一问题启动+ OWIN Cookie不会发送到浏览器。

ASP.NET_SessionId + OWIN Cookies do not send to browser This page seems to provide a workaround to the issue by creating a session on application start up.

这篇关于ASP.net身份登录时2.0没有建立有效的验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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