-
Notifications
You must be signed in to change notification settings - Fork 868
Aspnet Core 2.0 Authorization issues after deploying to IIS #1543
Comments
For a raison that I ignore, it works when I started the application using my host name instead of "localhost/". Is there a configuration for a such thing? |
I think this is IIS setup and not an identity issue. Probably default website configured incorrectly. |
It works fine on a VM having the same environment. And was not obliged accessing the Application using the host name of an FQN. My site on IIS is the default (running on port 80) |
302 is the redirect, so that's an expected status code. Have you tried using fiddler and seeing if an auth cookie is created? |
We're closing this issue as no response or updates have been provided in a timely manner. If you have more details and are encountering this issue please add a new reply and re-open the issue. |
@blowdart , we just found something similar. Rather than get 302 from Apparently "PasswordSignInAsync()" sets status code 302 when user is valid. Normally it's ok, but we're using OTP, and not expecting a redirecting at this stage. (We don't redirect to an OTP code page, but just outputs different view) Would this consider to be a bug? the PasswordSignInAsync() should not handle the redirect operations. Before: After: We're using 2.0.3. Similar behavior was not found on 2.1.0 |
I also have the same issue on 2.1.3 |
I have a Aspnet Core 2.0 application. I configured both Identity and Jwt as below:
`
Everything runs ok on Visual Studio and I have both Identity Cookies and Jwt enabled.
but once deployed to IIS on my Machine, the calls are all Unauthorized 401 HTTP Code.
I debugged using Remote Debugger on IIS and I was able to see that the user was authenticated and authorized in the below method:
But when executing this instruction
return RedirectToAction(nameof(AppController.App), "App");
where I am redirecting to the main page it returns 302 HTTP:I don't know why in VS it is working well and not in IIS.
The text was updated successfully, but these errors were encountered: