Web Application folder path

J

JV

Anyone know how to get a path to your web application's folder at design
time? I've tried using MapPathSecure in the OnInit call, but no luck.
 
A

Antonio Bakula

Anyone know how to get a path to your web application's folder at design
time? I've tried using MapPathSecure in the OnInit call, but no luck.

there is no good and clean (i mean documented) way to do this, it depends
on IDE (developing environment) that you use. I tried to solve this problem
but I am *NOT* happy with the result, you can try my solution because I am
not sure that will work with new versions of VS.NET IDE, I tested it with
VS.NET 2003.

This assembly also suports Borland IDE's and here I AM SURE that this will
work forever because Borland defined nice and clean interfaces for IDE
intergration (not just design time)

Here is how this works, in this PDesignTimeTools.dll there are 2 dll's
included as resource, one for BDS and one for VS.NET, only purpose of this
included dll's is to get web app path for selected IDE in design time.
PDesignTimeTools first detects IDE used and then it extracts proper
assembly from resource and call code to get web app path for current IDE.

I used resource dll's because I did not wont to include dependancies on
both BDS and VS.NET, and any other IDE specific dll that I will include in
this project.


here it is :

http://www.antoniob.com/projects/PDesignTimeTools.aspx

free and source included, beware Delphi.NET !
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top