I have run Two Applications in different ports.
One is : http://localhost:12345/
and another one is : http://localhost:50949/
Now I got a cors domain issue, So I want to run those applications on same port number in vs 2012
How can i do it?
I have run Two Applications in different ports.
One is : http://localhost:12345/
and another one is : http://localhost:50949/
Now I got a cors domain issue, So I want to run those applications on same port number in vs 2012
How can i do it?
If you configure Visual Studio to use IIS you can configure both websites under a different Virtual Directory, which will allow you to run them side-by-side. It does require you to have your routing setup correctly to understand the difference between ApplicationRoot and WebRoot, and that you're using the HTML Helpers objects everywhere to setup your routs in links.
You can also configure virtual directories in IIS express if you want to, but I suspect you'll need to dive into the XML to make it work.
I'm adding another answer with another option. Using full-blown IIS has some advantages, but not everyone has it installed or even has the option to install it. Visual Studio, by default, will assign ports to each project and create them in IIS Express. However, you can easily override it in the project properties.
As an example, I might have two project that look like this:
When I deploy these, I'll run them in different virtual directories like this:
To mimic this in Visual Studio with IIS Express, I can go to the Project Properties of MyNamespace.Web.Api and change the Project Url (under Servers, on the Web tab) to http://localhost:12345/api/ and click the "Create Virtual Directory" button.
My two projects are now running on IIS Express, using the same port, but in different virtual directories.