2

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.

Community
  • 1
  • 1
Dani
  • 14,639
  • 11
  • 62
  • 110
  • What have you tried exactly (not simply pasting some links) and what is the current config of your web site? – Lex Li Apr 21 '16 at 23:24
  • trying changing the port on applicationhost.config but it didn't help. didn't find anything in the UI to make the change. I've open a new web site project - so config file should be visual studio default. – Dani Apr 23 '16 at 06:29

3 Answers3

4

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.

Suamere
  • 5,691
  • 2
  • 44
  • 58
1

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

Mark Ch
  • 2,840
  • 1
  • 19
  • 31
1

MacBook Solution:

Actually, the Web Tab is not showing because there is no IIS server installed on the Macbook but there is another way to run your application on a different port.

Right Click on your project and select Edit Project File and at the bottom you will see the following code. Change to the port you want in the port Attribute.

After changes Clean the build for the project or solution and run the project.

<MonoDevelop>
  <Properties>
    <XspParameters Port="55976" Address="127.0.0.1" SslMode="None" SslProtocol="Default" KeyType="None" CertFile="" KeyFile="" PasswordOptions="None" Password="" Verbose="True" />
  </Properties>
</MonoDevelop>
Mirza Q Ali
  • 477
  • 5
  • 6