Change default port for iis-express Visual Studio 2015 for WEB SITE project

戏子无情 提交于 2019-12-12 20:30:11

问题


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.


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/36769854/change-default-port-for-iis-express-visual-studio-2015-for-web-site-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!