How can I run the "Development server" w/o a virtual path? (root)

C

cmay

I have a web application that I want to run using the "ASP.NET
Development Server" when I am working locally.

When I go to do this however, I don't see an option to set the Virtual
Path. By default it creates a virtual path that is the same name as
the folder that holds my app, e.g. "/MyWebApp", but in this case the
app I am trying to run is a root website application, so there are lots
of relative URLs that are expecting /images, or /styles or /javascript,
not /MyWebApp/images etc.

Is there a way that I can configure this to run w/o the virtual path?
 
C

Chris Fulstow

Hi,

Try using the tilde character to refer to you application root. It's a
shotcut for HttpRuntime.AppDomainAppVirtualPath.

For example, reference you images folder as:
~/images

Note that this only works for some server-side controls.

HTH,

Chris
 
C

cmay

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,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top