Base solution for your next web application
Open Closed

Angular Client - Login Failed #4400


User avatar
0
ajayak created

When I click on login on Angular App, I get a blank screen with following message:

The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.

Log:

INFO 2017-12-26 11:12:31,346 [8 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 OPTIONS <a class="postlink" href="http://primepenguinservice.azurewebsites.net/AbpUserConfiguration/GetAll">http://primepenguinservice.azurewebsite ... ion/GetAll</a>
INFO 2017-12-26 11:12:31,389 [3 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 OPTIONS <a class="postlink" href="http://primepenguinservice.azurewebsites.net/AbpUserConfiguration/GetAll">http://primepenguinservice.azurewebsite ... ion/GetAll</a>
INFO 2017-12-26 11:12:31,444 [8 ] pNetCore.Cors.Infrastructure.CorsService - Policy execution successful. INFO 2017-12-26 11:12:31,445 [3 ] pNetCore.Cors.Infrastructure.CorsService - Policy execution successful. INFO 2017-12-26 11:12:31,577 [3 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 188.4834ms 204 INFO 2017-12-26 11:12:31,558 [8 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 233.4529ms 204 INFO 2017-12-26 11:12:31,884 [3 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET <a class="postlink" href="http://primepenguinservice.azurewebsites.net/AbpUserConfiguration/GetAll">http://primepenguinservice.azurewebsite ... ion/GetAll</a> application/json INFO 2017-12-26 11:12:31,886 [3 ] pNetCore.Cors.Infrastructure.CorsService - Policy execution successful. INFO 2017-12-26 11:12:32,138 [3 ] uthentication.JwtBearer.JwtBearerHandler - Bearer was not authenticated. Failure message: No SecurityTokenValidator available for token: null INFO 2017-12-26 11:12:33,738 [3 ] pNetCore.Cors.Infrastructure.CorsService - Policy execution successful. INFO 2017-12-26 11:12:33,872 [3 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore) with arguments ((null)) - ModelState is Valid INFO 2017-12-26 11:12:36,559 [3 ] matters.Json.Internal.JsonResultExecutor - Executing JsonResult, writing value Abp.Web.Models.AjaxResponse. INFO 2017-12-26 11:12:37,010 [3 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore) in 3297.4741ms INFO 2017-12-26 11:12:37,026 [3 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 5141.863ms 200 application/json; charset=utf-8 I

Browser Network Tab: Request URL:http://primepenguin.azurewebsites.net/account/login Request Method:POST Status Code:405 Method Not Allowed

Note: I can still get the access token when I make the request through POSTMAN


4 Answer(s)
  • User Avatar
    0
    ajayak created

    The application works fine on local machine. I was using AspNetZero 5.0.4 on Azure. When I updated my app to 5.0.5, I started getting this error only on Azure App Service.

  • User Avatar
    0
    ismcagdas created
    Support Team

    @ajayak can you share full stack trace of the error message ?

  • User Avatar
    0
    ajayak created

    Hi @ismcagdas,

    I did a lot of things on App Service but deleting the web.config and uploading the same config file again did the trick for me. I'm so confused :shock:

  • User Avatar
    0
    ismcagdas created
    Support Team

    @ajayak,

    That is strange. Some settings on the azure side might have changed your web.config to block PUT request. This is the only assumption I can make for now, I'm glad that you have solved it, such problems are hard to solve :).