0

I have two projects: an ASP.NET web application and a WebAPI application. Web application uses the WebAPI application via AJAX. To avoid cross domain problem, I want to the two projects deployed under one domain on Azure. For example:

http://www.mycompany.com/api/products is a web api.

http://www.mycompany.com/index.html is the home page of the site, which calls the web api via AJAX.

Is it possible?

1 Answer 1

1

Yes, you can host multiple applications on the one site.

Go to Configuration / Virtual Applications and Directories: Simply host your app under

/     site\wwwroot

And host your API under

/api  site\wwwroot\api

And make sure your API is copied to the api sub-directory.

Make sure you tick the Application box.

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

Comments

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.