1

I have a solution based on two projects:

  • Frontend: is an Angular4 application
  • Backend: is a .Net Core webapi

All works perfectly in local, I have configured two separated application in IIS, one for front end and one for backend and it works.

Now I have to go online on internet in a website like: "www.mysolution.com"

In the internet hosting I can't create two sepateted application and I have to host all on the same IIS Application folder.

How can I do it ?

Thanks to support

2
  • Can you provide more detail on your current local setup? (Webroot layouts, bindings & solution layouts). Server side is rewrite module available and can you add multiple bindings to single site? Commented Jul 28, 2018 at 13:56
  • Webapi and Angular Frontend must go on same application under wwwroot. The host is private and for commercial, so I only have ftp access... I think the solution should be extend the webapi implementing MVC pattern and adding the routing to index view where I put the index.html content of the angular application... Should work... Commented Jul 29, 2018 at 17:52

1 Answer 1

1

You can use a Virtual directory inside your main IIS website, to create a separate application inside your main website. In IIS, right click on your website, Add Application. Select a (different) webroot for your API, and select an Alias - ie the path prefix to access your api.

If you own example.com, and have it setup on your server, you can add an Application alias api, then you can access the api via example.com/api. The main website and the API Application will have different App Pools, and can be configured differently by the top level web.config in the websites webroot and the API's webroot.

Sign up to request clarification or add additional context in comments.

1 Comment

Hi MisterSmith, I can't manage IIS because I'm on a commercial hosting provider... I can only publish file to a single application with ftp... I have to merge the two projects once deployed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.