How to get the Virtual Directory's physical path...

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2008
Posts: 1
Reputation: mop is an unknown quantity at this point 
Solved Threads: 0
mop mop is offline Offline
Newbie Poster

How to get the Virtual Directory's physical path...

 
0
  #1
Jan 17th, 2008
Hi,

I hv create an application using C#, Asp.Net (VS2005), While Im creating setup project for that application, I add Custom Installer Class (for getting user input and update my web.config connection string at the time of installation). Its working fine. (the custom installer class automatically crates a file in application's bin folder named CustomInstaller.InstallState when install - I dont know how any why)

But when I am uninstalling the application, the UnInstaller process wont remove the physical folder in my wwwroot folder, and it wont remove the virtual dir also (Because the file CustomInstaller.InstallState didn't get removed from the bin folder)

Now I need to remove all the physical directory and the virtual dir, when i uninstall the application. (I plan to get the physical path of the application and the virtual directory name when install, so that I can store that in a text file and can use it when install), but I cant get the physicall path of that vDir,

Any Idea pls..
Thank you in advance
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,080
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Solved Threads: 68
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: How to get the Virtual Directory's physical path...

 
0
  #2
Jan 17th, 2008
to find the physical path, you have to know where it is based from the root of the folder. THen you can create a dummy aspx page to find your virtual path. THe dummy page will contain:
  1. <%= server.MapPath("/vdir/") %>
This will show you the physical path to the vdir.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC