How to get the application path

A

Arjen

Hello,

I have an ASP.NET web application on this place:
C:\webapplications\portal\

Inside my C# class I tried to get the application path like this:
System.Web.HttpContext.Current.Request.ApplicationPath

But this is getting this path:
C:\webapplications\

But I want that it gets directly this path:
C:\webapplications\portal\

Because the name is not always "portal".

Is there a way to do this?

Thanks!
 

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

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top