Open Closed

Project "ASP.NET Core & Angular-Single Solution"(v6.6.0) missing a HomeController.cs in the project "*.Web.Host" #6445


0
limingjun2018 created

Hi, I downloaded "ASP.NET Core & Angular-Single Solution", opened it with Visual Studio 2017, restored packages, updated database, and then set "*.Web.Host" as start up project, pressed Ctrl+F5 to start it, then the brower would navigate to http://localhost:22742 and showed no page found.

To figure it out, I downloaded "ASP.NET Core & Angular" (non single Solution ), did so as the single solution version, and the browser showed the swagger/index.html. By comparison, I found "ASP.NET Core & Angular-Single Solution" has no such a file HomeController.cs in the project "*.Web.Host". I copied it here from "ASP.NET Core & Angular" (non single Solution ), and therefore it workd normally.

The question above is really a problem or it is just by design? Or there was an error during my process? Am I right to deal with this problem?

thank you for your answer.


1 Answer(s)
  • 0
    ismcagdas created

    Hi @limingjun2018

    Actually we didn't want to create merged solution at the beginning. Then after the requests from community, we modified our generator on aspnetzero.com to move files of Angular project into Web.Host project.

    After that, if you want to host both Web.Host project and Angular project under the same website, you need to remove the HomeController, otherwise, when you try to open angular app (/index.html), you will be redirected to swagger-ui instead.

    So, this is kind of workaround rather than a design :).

    But, we realize that many users are using merged project and we will add this inforamtion to our download page or our documentation.

    Thanks,