I have multiple APIs that use the same port (8888). These APIs are part of different solutions.
http://localhost:8888/api1
http://localhost:8888/api2
....
When I run any of the APIs in visual studio 2013 (hit F5), iis express starts and all of the APIs are running. This happens even though the APIs are part of different solution. I can see them when I click on the iis express icon under View Sites.
I installed VS 2015 and when I run one API in visual studio the other APIs do not run. I cannot even run the other APIs in the other solution since I get:
unable to launch iis express.. port is in use
how can I get the other APIs to run when I run any API? I need to mimic the behavior that exists in VS 2013 in VS 2015.
Thanks.
iisexpress /path:c:\myapp\ /port:80 This command runs the site from c:\myapp folder over port 80. Run your site using one of the following: Use /config to run a site from a configuration file.
Normally when you run an application in IIS Express, it's only accessible on http://localhost:[someport]. In order to access it from another machine, it needs to be bound to your public IP address as well. Open* D:\Users[YourName]\Documents\IISExpress\config\applicationhost. config *and find your site.
Does IIS Express use the same configuration system as IIS? Yes, IIS Express uses the same applicationhost. config and web.
Configure IIS express on visual studioSelect the web application project and open properties -> select the web tab -> under server's select IIS express-> Specify the project URL. Now open the project folder and . vs folder (Hidden) -> Config -> applicationhost.
I solved this for a similar scenario, although in my case I chose to run IISExpress via the command line and passed through the config file as an argument.
As an example, I have two applications that I want to host simultaneously on port 80 on localhost:
<sites>
<site name="test" id="1" serverAutoStart="true">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\codepath" />
</application>
<application path="/api1" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\codepath\api1" />
</application>
<application path="/api2" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\codepath\api2" />
</application>
<bindings>
<binding protocol="http" bindingInformation=":80:localhost" />
</bindings>
</site>
<!-- other settings relevant to your installation of IISExpress-->
</sites>
The key things I had to do to get this working was:
Update to this in Visual Studio 15+ the IIS config folder is in the projects hidden .vs folder [ProjectFolder]/.vs/[ProjectName]/config/applicationhost.config Other than that, Ivor's Answer still worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With