all groups > iis security > january 2008 >
You're in the

iis security

group:

Creating Virtual Directory on shared drive


Creating Virtual Directory on shared drive vasimo
1/15/2008 7:31:01 AM
iis security:
Hi,
HELP!!!!!!!!!!!!!

XP Desktop with IIS 5 doing web class development. Virtual directories are
required for .Net apps.
Our root folder for the web site is located on a drive share.
I am trying to create virtual directories using VB script on all developer
machines.
The following creates the virtual and applies the following parms but tags
it with an error of 'Access Denied'.
If I move the virtuals to the C drive it works with no issues.
If I create it maually on the share, it prompts for the UID & PW and then
creates it without the 'Access Denied' error.
How do I give the create command the UID & PW so the script will do what the
manual process allows?
Thanks Vic

Const WebClassDirPath =
"\\ny17nt103\shared\itshare\ADIApplications\Develop\APPS\Develop\ADIADONIS\"
Const wDirName = "ZYZ123"

Set IIsWebVDirRootObj = GetObject("IIS://localhost/W3SVC/1/Root")
Set IIsWebVDirObj = IIsWebVDirRootObj.Create("IIsWebVirtualDir",
wDirName)
If Err.Number = 0 Then

IIsWebVDirObj.UNCUserName = strUser 'contains valid UID
IIsWebVDirObj.UNCPassword = strPassword 'contains valid PW
If (Err > 0) Then
MsgBox "UNCPassword error - " & Err & " " & Error.Description
Wscript.quit (0)
End If

IIsWebVDirObj.Put "Path", WebClassDirPath & wDirName
IIsWebVDirObj.Put "AccessRead", True
IIsWebVDirObj.Put "AccessScript", True
IIsWebVDirObj.Put "AppIsolated",0 '1=High, 2=Medium,
0=Low
IIsWebVDirObj.Put "DontLog", False 'False means log
visits

IIsWebVDirObj.Put "AppFriendlyName", wDirName
IIsWebVDirObj.SetInfo
End If
Re: Creating Virtual Directory on shared drive David Wang
1/15/2008 11:35:02 PM
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/=
webapp/iis/remstorg.mspx

Are you sure your code mirrors ALL the proper value settings? I don't
see AuthFlags .


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//



[quoted text, click to view]
AddThis Social Bookmark Button