Change default port for iis-express Visual Studio

2019-07-18 10:39发布

Spend a lot of time looking for this one, here what I've found so far:

Change default iis express port

change default iis for web application

I have a web site in visual studio 2015 (aspx) I want to change the default port. No way to do it. Here are some hints - that used to work, or works for web application but this is not the case. no csproj file, changing applicationhost.config did not help either.

2条回答
再贱就再见
2楼-- · 2019-07-18 10:45

Do a File-Search for files containing that port number. Doing so yielded these results for me:

.sln file - VWDPort seems like the most important one

.sln file - 3 results found Virtual Directory setup, which probably doesn't matter as much, but I changed that also. It looks like ...\localhost_[portNumber]

applicationhost.config - specifies 2 places with binding to *.[portNumber]:localhost

VWDPort may be the only one required, but I changed those I found anyway.

查看更多
Juvenile、少年°
3楼-- · 2019-07-18 10:55

Port number is specified in applicationhost.config, but there are two verions of this file - one system-wide and one per-user.

The file you need to change is at this location: %userprofile%\documents\IISexpress\config\applicationhost.config

查看更多
登录 后发表回答