Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context.User.Identity.IsAuthenticated works in IIS7 but is always false in IIS8.5 #3366

Closed
zelid opened this issue Dec 18, 2014 · 1 comment

Comments

@zelid
Copy link

zelid commented Dec 18, 2014

Hello,

I SignalR 2.1.2 and ASP.NET MVC 5.1

User is authenticated in ASP.NET MVC and I need to get username in SignalR hub.
To do this I access Context.User.Identity.IsAuthenticated and Context.User.Identity.Name inside hub.

On development machine Windows Server 2008 / Visual Studio 2013 IIS Express and IIS7 everything works fine.

When I deploy to WIndows Server 2012R2 and IIS 8.5 Context.User.Identity.IsAuthenticated is always false and Context.User.Identity is always empty.

When I run the same code on development machine - everything works fine.

I even uninstalled WebSockets support on Windows Server 2012R2 but the problem still there.

What is the reason of this behavior? How to fix it?

Thank you.

@zelid
Copy link
Author

zelid commented Dec 18, 2014

The problem was in different domain names for cookie.

@zelid zelid closed this as completed Dec 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant