Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Deployment questions with public site and SPA #4770


User avatar
0
dparizek created

So for the Angular/ASP.NET Core version:

I can see how to choose one solution and deploy both client and back end of SPA to one URL.

Then if you wish to deploy the public site you would need a different URL, correct?

and you have the option to deploy the client side to one URL, the back end to another, and the public to a 3rd URL.

But most of us probably want all three at one URL.

With ports, this is very feasible.

With Azure, and no ports, how to do?

Ideally someone visits <a class="postlink" href="http://mycustomdomain.com">http://mycustomdomain.com</a> and sees public site. Then I can link them to the client SPA at <a class="postlink" href="http://mycustomdomain.com/spa/">http://mycustomdomain.com/spa/</a> and the angular routing handles everything under spa (or app or whatever is specified).

Then I need only one domain name, and can keep everything branded to that one domain name. I can have spa/angular section and mvc/public section and both integrate to same auth database and I can have my cake and eat it too.

Is this currently possible with all-in-one solution for Angular/Core version?

It was that way with Angular 1/MVC version.


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

    @dparizek I'm not sure about this. You can host Angular & Host projects in a single website by little changes. If you have downloaded merged project this is built-in.

    But public website is a MVC 5.x website, so this is about hosting an ASP.NET Core (Host) and MVC 5.x in a single website.

  • User Avatar
    0
    ismcagdas created
    Support Team

    @dparizek, sorry I just realized that Public website is ASP.NET Core as well.

    So, public website and host website are not designed to be hosted on the same website. I think it is not possible to host two ASP.NET Core websites in a single application on IIS.

  • User Avatar
    0
    ultimatemm created

    Hi, ismcagdas

    For this case, will it be nice to have the option Angular as Frontend+Public website and AspNetCore as backend? So we need to handle one URL for AspNet+Angular merge version and two URL with angular and asp net core separate version. Thanks

  • User Avatar
    0
    alper created
    Support Team

    how about hosting them in different subdomains? So you'll have <a class="postlink" href="https://MySite.com">https://MySite.com</a> (Public) and <a class="postlink" href="https://App.MySite.com">https://App.MySite.com</a> (Admin)

    <a class="postlink" href="https://stackoverflow.com/a/48061353/1767482">https://stackoverflow.com/a/48061353/1767482</a>