Creating Virtual Directory on shared drive

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\Dev elop\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
vasimo [ Di, 15 Januar 2008 16:31 ] [ ID #1908415 ]

Re: Creating Virtual Directory on shared drive

http://www.microsoft.com/technet/prodtechnol/windowsserver20 03/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
//



On Jan 15, 7:31=A0am, vasimo <vas... [at] discussions.microsoft.com> wrote:
> 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 t=
he
> manual process allows?
> Thanks Vic =A0
>
> Const WebClassDirPath =3D
> "\\ny17nt103\shared\itshare\ADIApplications\Develop\APPS\Dev elop\ADIADONIS=
\=AD"
> Const wDirName =3D "ZYZ123"
>
> =A0 =A0 Set IIsWebVDirRootObj =3D GetObject("IIS://localhost/W3SVC/1/Root"=
)
> =A0 =A0 Set IIsWebVDirObj =3D IIsWebVDirRootObj.Create("IIsWebVirtualDir",=

> wDirName)
> =A0 =A0 If Err.Number =3D 0 Then
>
> =A0 =A0 =A0 =A0 =A0IIsWebVDirObj.UNCUserName =3D strUser =A0 =A0 =A0 =A0 '=
contains valid UID
> =A0 =A0 =A0 =A0 =A0IIsWebVDirObj.UNCPassword =3D strPassword =A0 =A0 'cont=
ains valid PW
> =A0 =A0 =A0 =A0 =A0If (Err > 0) Then
> =A0 =A0 =A0 =A0 =A0 =A0 =A0MsgBox "UNCPassword error - " & Err & " =A0 " &=
Error.Description
> =A0 =A0 =A0 =A0 =A0 =A0 =A0Wscript.quit (0)
> =A0 =A0 =A0 =A0 =A0End If
>
> =A0 =A0 =A0 =A0 IIsWebVDirObj.Put "Path", WebClassDirPath & wDirName =A0
> =A0 =A0 =A0 =A0 IIsWebVDirObj.Put "AccessRead", True
> =A0 =A0 =A0 =A0 IIsWebVDirObj.Put "AccessScript", True
> =A0 =A0 =A0 =A0 IIsWebVDirObj.Put "AppIsolated",0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0'1=3DHigh, 2=3DMedium,
> 0=3DLow
> =A0 =A0 =A0 =A0 IIsWebVDirObj.Put "DontLog", False =A0 =A0 =A0 =A0 =A0 =A0=
=A0 'False means log
> visits
>
> =A0 =A0 =A0 =A0 IIsWebVDirObj.Put "AppFriendlyName", wDirName
> =A0 =A0 =A0 =A0 IIsWebVDirObj.SetInfo
> =A0 =A0 End If
David Wang [ Mi, 16 Januar 2008 08:35 ] [ ID #1909601 ]
Webserver » microsoft.public.inetserver.iis.security » Creating Virtual Directory on shared drive

Vorheriges Thema: IIS 5.0
Nächstes Thema: Setting Anonymous 'Write and Execute' Permission to a folder