locked
Hello, I cannot access any Controller action in my ASP.NET MVC published in IIS 10 RRS feed

  • Question

  • User-187020391 posted

    Details:
    OS: WIndows 10 Home

    IIS: Version 10

    IDE: VS Pro 2019

    (NOTE: if the images are too small, right click on the image, then click `View Image`)

    I have published my application with VS Pro 2019. It is published in the `inetpub\wwwroot\hrportal` folder. (hrportal is the Solution name)

    ine

    I added it as an application:

    I try to access it. and can see that the app is deployed perfectly.

    So I try to access to a Controller URL (`Admin/Login` accessing `AdminController#Login`)  and I get this:

    When I deploy it through VS Pro, however, it perfectly works:

    How can I resolve this so that it works when deployed on IIS?

    Sunday, December 6, 2020 7:10 PM

All replies

  • User690216013 posted

    From this screen shot we can see you didn't even enable ASP.NET 4.x on IIS (so the middle panel lacks of ASP.NET related icons). That leads to all 404.0 errors later. Go back to Control Panel to manually enable such Windows feature please.

    You didn't get such issues when running directly from VS, because VS uses IIS Express to run your web app in that case, and IIS Express always ships with ASP.NET 4.x features on its own.

    Sunday, December 6, 2020 9:23 PM
  • User1771714573 posted

    Hi justin.jalandoni,

    Can you show the screenshot of windows features? as in this example picture.

    I think you do not have the Asp.Net module installed, and IIS cannot forward it to the asp.net routing pipeline after receiving the request, so the module that shows the error in the error is IIS Web Core.

    Best regards,

    Brucz

    Monday, December 7, 2020 3:41 AM