Reputation: 994
I have 2 ASP.Net MVC web application, ParentSite and ChidSite. ParentSite has a page which will open a pop-up window which will navigate to child site, when childpage is done it notifies the parent page. However I'm getting a cross domain error as
Parent is = http://localhost:49000/Home
Child is = http://localhost:50000/Home
Is there a way in Visual Studio where I can run both the web application under one port in Visual Studio development server ( NOT ON LOCAL IIS SERVER ).
If we use the same-port in the project, Visual Studio automatcally chooses a dynamic port if there is already DEV server running on it.
Thanks for the help.
Upvotes: 2
Views: 5657
Reputation: 3326
No, you can't host two applications under the same port/application space. Think of things like web.config, routing (as mentioned in the comments), security, etc. Those are all part of that space.
You could try to solve the cross-domain errors, but this isn't straightforward and isn't cross-browser friendly (yet). I hope that changes.
You have a couple of options:
To add areas simply right-click on your MVC project in Solution Explorer and select Add -> Area.
Cheers.
Upvotes: 3