I don't think that you can switch ports
for the application from within the IDE.
You could approach this in two ways but,
before you try either of them, make sure
you've backed up the project and application.
1. Edit the .sln file to reflect the port change.
You'll see lines like this one when you open the
.sln file in a plain-text text editor, like Notepad:
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") =
"
http://pathtoYourApp/"
Debug.AspNetCompiler.VirtualPath = "/pathtoYourApp"
Release.AspNetCompiler.VirtualPath = "/pathtoYourApp"
Replace those references with : "/localhost:8080"
Release.AspNetCompiler.VirtualPath = "//localhost:8080"
If you are using a web address (
www.yourserver.com ),
replace "localhost" with that.
Then, open the IIS Manager ( MMC ), and create an Application
on port 8080 which points to your physical application's directory.
VS.NET should be able to open the website in the new port.
If you're not too adventurous, you might try :
2. Eliminate the IIS Application ( in the MMC )
for the physical directory which hosts your application.
Create a new application on port 8080 which points
to your current application's physical directory.
Then, use VS.NET's "Open from Web" feature
to open the port 8080 application you just created.
Warning: you might need, if you have more than one version
of the .NET Framework installed, to create a new Application
Pool to house your new port 8080 app, in case IIS assigns the
new port 8080 app to a different ASP.NET version than the
one which is running in your DefaultAppPool.
Disclaimer: I am not responsible for any results
stemming from the use of either of these techniques.
I did, however, just use technique #2, to change an application
from port 80 to port 81. Changing it to port 8080 should work
the same way.
Good luck!
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================