By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,164 Members | 1,047 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,164 IT Pros & Developers. It's quick & easy.

cannot access virtual directory in classic asp

P: 1
i am trying to access a virtual directory to retrieve file names of files it contains. here is the code:
Expand|Select|Wrap|Line Numbers
  1. Set FSO = Server.CreateObject("Scripting.FileSystemObject")
  2. Dim mapPath
  3. mapPath=Server.MapPath("http://development/far/")
  4. Set farFolder = FSO.GetFolder(mapPath)
the code gives file not found error.
i am fairly new to asp so do not know where i am going wrong
Dec 10 '12 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 100+
P: 465
Is this site running on IIS7? If so using FileSystemObject to do this is never going to work because it only works on the physical file system. It does not know about or understand virtual directories - this aspect of your site is managed entirely by IIS.

It is not a question of permissions it is a question of the directory not physically being there so browsing the physical file system will never see it
Dec 13 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.