[ASP.NET 2.0] Help with debugging

J

James Bailey

I just converted to ASP.NET 2.0 and VS2005, but I'm having major problems.
I've gone through all the conversions necessary, but I can't debug my
applications.

I have a website designed to run as the root ("/"), but debugging at the
root level is no longer enabled. I can try to work around this one, but...

In Application_Start of Global.asax I call:

string s = this.Context.Server.MapPath("/");

This line throws an InvalidOperationException. First, why can't I call
this? And second, how do I get the root path set to a folder?

Thanks.
 
S

Scott Allen

James:

Is the app running under IIS or under the WebDev server that runs in
the system tray?

Have you tried Server.MapPath("~"); ?
 
J

James Bailey

No, but I'm about to test that. However, I think it unlikely to work. For
example,

http://localhost/ maps to c:\inetpub\wwwroot
http://localhost/app/ maps to c:\scripts\app

In the page http://localhost/app/test.aspx, I want to be able to get the
root path (i.e. c:\inetpub\wwwroot).

----
James Bailey








Scott Allen said:
James:

Is the app running under IIS or under the WebDev server that runs in
the system tray?

Have you tried Server.MapPath("~"); ?
 

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

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top