user848341
user848341

Reputation:

How to find directory structure on server asp.net

I have a webpage on this webpage I need to find the directory name on the server. Can someone explain to me how to does this or better yet show me some source code or reference me to a project with some source code that I can download.

Upvotes: 1

Views: 411

Answers (2)

TheGeekYouNeed
TheGeekYouNeed

Reputation: 7539

Rick Strahl wrote a great article called Making Sense of ASP.Net paths that you should definitely read.

Upvotes: 1

Aristos
Aristos

Reputation: 66641

The starting directory name of your webpages on the server is

HttpContext.Current.Request.PhysicalApplicationPath

Upvotes: 0

Related Questions