Reputation: 9564
I have a WebSite project in Visual Studio 2013 (not a Web Application project). On previous versions of VS (up to 2012) there was an option in project properties to use a dynamic or fixed port, but now the option (static/dynamic) has been removed.
From what I can see, VS2013 assigns a (randomly-generated) static port when the WebSite is added to the solution, writing it in the solution file and also in the new node it creates in the IISExpress configuration for the website (if it doesn't already exist).
The randomly-generated port can be changed by manually editing both the .sln file (multiple entries) AND the IISExpress config file in
C:\Users\UserName\Documents\IIExpress\config\applicationhost.config
Is there a way to do this within the GUI? Also, is there a way to configure a dynamic port assigned to a WebSite project instead of a static one?
Upvotes: 2
Views: 236
Reputation: 6258
For 2015, I posted my answer here: https://stackoverflow.com/a/43698869/1831054
Basically, I just did a file-search for files containing the "taken" port number, and replaced where necessary. May be different for 2013 or other versions.
Upvotes: 1