Base solution for your next web application
Open Closed

Authorization failed when deployed to IIS #8824


User avatar
0
brave created

My applicatin (ASP.NET Core & jQuery) when deployed to IIS shows Authorization failed error and i'm unable to login into the application from admin. Application works fine when run thru IIS express.

Following is the entry from Logs.txt file. What is causing authorization to fail?

INFO 2020-04-08 06:58:55,392 [12 ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Test.Web.Controllers.AccountController.Login (Test.Web.Mvc)' INFO 2020-04-08 06:58:55,392 [12 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 377.2518ms 200 application/json; charset=utf-8 INFO 2020-04-08 06:58:55,410 [12 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:9945/TestSite
INFO 2020-04-08 06:58:55,418 [12 ] uthorization.DefaultAuthorizationService - Authorization failed. INFO 2020-04-08 06:58:55,419 [12 ] tion.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.Application was challenged. INFO 2020-04-08 06:58:55,420 [12 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 9.5155ms 302 INFO 2020-04-08 06:58:55,422 [5 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:9945/Account/Login?ReturnUrl=%2FTestSite

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

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

    Application works fine when run thru IIS express.

    Can you test your application in a Production environment at IIS express?

    https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments?view=aspnetcore-3.1

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)