Base solution for your next web application
Open Closed

Web.Controllers.HomeController.Index not invoked #10524


User avatar
0
timmackey created

ANZ Version 8.1.0 Angular/.NET Core

On my Production Azure web site the server log is

INFO   [4    ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET https://mysite-server.azurewebsites.net/  
INFO   [4    ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'myProject.Web.Controllers.HomeController.Index (myProject.Web.Host)'
INFO   [4    ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "Index", controller = "Home", area = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.IActionResult Index() on controller myProject.Web.Controllers.HomeController (myProject.Web.Host).
INFO   [4    ] c.Infrastructure.ControllerActionInvoker - Executing action method myProject.Web.Controllers.HomeController.Index (myProject.Web.Host) - Validation state: Valid
INFO   [4    ] c.Infrastructure.ControllerActionInvoker - Executed action method myProject.Web.Controllers.HomeController.Index (myProject.Web.Host), returned result Microsoft.AspNetCore.Mvc.RedirectToActionResult in 4.6475ms.
INFO   [4    ] ft.AspNetCore.Mvc.RedirectToActionResult - Executing RedirectResult, redirecting to /Ui.
INFO   [4    ] c.Infrastructure.ControllerActionInvoker - Executed action myProject.Web.Controllers.HomeController.Index (myProject.Web.Host) in 144.0675ms
INFO   [4    ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'myProject.Web.Controllers.HomeController.Index (myProject.Web.Host)'

However, on my Developmen Azue web site the server log is

INFO   [7    ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET https://mysite-server-development.azurewebsites.net/  
INFO   [7    ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'myProject.Web.Controllers.HomeController.Index (myProject.Web.Host)'
INFO   [7    ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "Index", controller = "Home", area = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.IActionResult Index() on controller myProject.Web.Controllers.HomeController (myProject.Web.Host).
																																									   
																																																						  
INFO   [7    ] ft.AspNetCore.Mvc.RedirectToActionResult - Executing RedirectResult, redirecting to /Ui.
INFO   [7    ] c.Infrastructure.ControllerActionInvoker - Executed action myProject.Web.Controllers.HomeController.Index (myProject.Web.Host) in 122.0668ms
INFO   [7    ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'myProject.Web.Controllers.HomeController.Index (myProject.Web.Host)'

Why would action method myProject.Web.Controllers.HomeController.Index (myProject.Web.Host) be called on the Production web site but not on the Development web site? The code is identical for Production and Development client and server. The log files are identical up to this point. The only difference is the config files, which have been reviewed and should work.


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @timmackey

    To find the problem, could you answer the questions below ?

    1. Do you host your Angular app and Host app under the same website on azure ?
    2. Could you share your Startup.cs code ?

    Thanks,

  • User Avatar
    0
    timmackey created
    1. Do you host your Angular app and Host app under the same website on azure? I followed instructions here: Step By Step Publish To Azure

    2. Could you share your Startup.cs code ? Sent via email.

    The app works flawlessly on localhost. The client is producing

    WARN: Could not find localization source: AbpWeb
    

    error message in the browser console, and this warning:

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @timmackey

    Thanks, our team will provide support via email for this case.

  • User Avatar
    0
    timmackey created

    I wiped out the slot and database, copied code from older version Production and loaded it into a new Development slot. Then applied updates. The code began working again. I've been applying more changes over the past few days to see if the error would reappear, and fortunately it has not. I suspect there might have been a missing file. However, I have been unable to ascertain a definitive cause of the error.