Base solution for your next web application
Open Closed

Not able to Login after Publishing ASP net core on IIS. #9515


User avatar
0
huntethan89 created

Hi,

I am using ASP.NET core v 9.0 and published the website on IIS. But when i try to login into application it is redirecting back to Login page.

I also checked the logs.txt file. It is showing following message. Can you please let me know what is the issue ?

WARN 2020-08-17 23:55:21,514 [15 ] e.HttpsPolicy.HttpsRedirectionMiddleware - Failed to determine the https port for redirect.

Thanks


9 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi

    Are you using the UseHttpsRedirection?

    https://docs.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-3.1&tabs=visual-studio#port-configuration

  • User Avatar
    0
    huntethan89 created

    Hi,

    I didn't make any changes in application. After running on Local system, i just published on server and tried the application. Now i have tried after commenting the line app.UseHttpsRedirection(); from startup file. it is still not working.

  • User Avatar
    0
    maliming created
    Support Team

    hi @smartlayer

    Is there any log in browser console window?

  • User Avatar
    0
    huntethan89 created

    Hi @maliming,

    No, As soon as as i click login. Page redirect back to login.

    Following is the browser console message :-

  • User Avatar
    0
    maliming created
    Support Team

    hi

    Try preserve log in console settings.

  • User Avatar
    0
    huntethan89 created

    Hi,

    Following is the result after preserving logs.

  • User Avatar
    0
    maliming created
    Support Team

    see https://support.aspnetzero.com/QA/Questions/9446/After-Tenant-sign-up---admin-any-user-from-same-browser-login-goes-into-loop-on-Chrome-other-browsers-work#answer-772d5fb6-98f0-be39-5908-39f712747eb5

  • User Avatar
    0
    huntethan89 created

    Hi @maliming,

    Yes, It worked.

    Thank you.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks @smartlayer