Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > ASP Forms
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 1st, 2004, 11:49 AM
Registered User
 
Join Date: Jun 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with Filesystem object & Virtual Directory

I have the code below running fine on my notebook (Localhost), but when I take it up to the Web server, it will not run find any files. I think it has to do with the fact that my notebook has test files local (in a normal directory) and the web server has a virtual directory setup. Can't fingure out how to set it up with a Virtual Directory.

Code:
strLocalPath = server.mappath("docs\" & sel) 'the "doc" is the name of the subfolder whre the doc files are in, "sel" is a form text box 
   If objLogFileFSO.FileExists(strPath) Then

local directory structer is
-wwwroot (C:\inetpub\wwwroot)
------ProductTags (C:\inetpub\wwroot\ProductTags)
---------HMCTAGS (C:\inetpub\wwroot\productTags\hmctags)

Server directory structure is (Web (IIS) server name = Server-1)
- wwwroot (F:\inetpub\wwwroot)
------ProductTags (F:\inetpub\wwwroot\ProductTags)
----------HMCTAGS (virtual directory set up in IIS called HMCTAGS
points to \\Server-2\TAGS\HMCTAGS\)


I think I understand the difference between using the server.mappath and not using it? virtual path of c:\intetpub\wwwroot would = / if using server.mappath ?

Looked thru reference materials (book, Active Server Pages 3.0) and did a search here but still lost.


strLocalPath = server.mappath("/ProductTags/" & sel) on the server does work since it's not a virtual directory, but as soon as I add "HMCTAGS" (virtural directory) no dice.


Thanks
J.C.



 
Old June 6th, 2004, 04:28 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You will need to talk to your server administrator about what user identity IIS is impersonating in order to run the code you are using. For example, if it is impersonating IUSR_<machinename> then this account is local to the webserver, and can't be given permissions to remote resources, hence your code will fail.

If you are using pass-through authentication, then you will need to use Basic Auth, or enable Delegation (if you are using Kerberos Authentication), or you will need to be using a Windows 2003 Functional Level domain + Protocol Transition.

Cheers
Ken

Microsoft MVP - Windows Server (IIS)
www.adOpenStatic.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Directory MeenaG BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 December 2nd, 2006 01:48 PM
Problem regarding the making of virtual directory CsharpHelp C# 0 October 27th, 2005 01:07 AM
Virtual Directory kristina BOOK: Beginning ASP 3.0 1 April 22nd, 2005 09:49 AM
Using The FileSystem Object Ben Horne Classic ASP Basics 1 December 1st, 2003 09:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.