My Thoughts & Views

Making Sense of Application Paths in ASP.NET

Posted on: February 21, 2008

Path names in ASP.NET may be confusing, but the concepts are simple:

Physical paths refer to the server’s filesystem (e.g., c:\inetpub\wwwroot\index.aspx).
Virtual paths refer to HTTP paths, the stuff in the browser address bar.

They come in two types: absolute and relative.

Absolute virtual paths are exactly what you see in the browser, starting with the / after the host name (e.g., /kiran/articles).
Relative (or app-relative) virtual paths start with ~/. The ~/ is magic and always represents the root virtual path of your application. So for an IIS application deployed at /India/culture/ ASP.NET transforms ~/ into /India/culture/. If the app is deployed to the IIS root (/), then ~/ simply becomes /.

For more information please refer to
1. ASP.NET Paths


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: