Web application debugging

C

Carlo

How can I debug, from Visual Studio .NET, a web application running on a web
server listening on TCP port 8080 rather than 80?

Thanks in advance.

Carlo
 
C

Carlo

Ok but the problem is changing an already created project on the default
port to the 8080 port. I've searched around the project settings without
success... any help ?

Thanks
 
J

Juan T. Llibre

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...
======================
 
C

Carlo

Thank you very much

Juan T. Llibre said:
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...
======================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top