programatically create webfolder

programatically create webfolder

am 02.07.2007 15:51:55 von Jay

I am trying to create a web folder - not a network share you connect via
SMB, the kind that you connect to via WebDAV. In Explorer, there is tab
called 'web sharing' that you can manipulate to create this type of 'share'.

I want to do it via VBS/ADSI. I have spent much time on Google and
searching MSDN, but maybe I am looking for the wrong terms.

Help?

Re: programatically create webfolder

am 02.07.2007 18:53:50 von David Wang

On Jul 2, 6:51 am, "Jay" wrote:
> I am trying to create a web folder - not a network share you connect via
> SMB, the kind that you connect to via WebDAV. In Explorer, there is tab
> called 'web sharing' that you can manipulate to create this type of 'share'.
>
> I want to do it via VBS/ADSI. I have spent much time on Google and
> searching MSDN, but maybe I am looking for the wrong terms.
>
> Help?


A "web folder" is just an HTTP-accessible URL namespace with WebDAV
enabled.

Thus, all you need to do is have WebDAV enabled on IIS, which varies
depending on IIS version.
- It is automatically enabled prior to IIS6 and difficult to disable
- IIS6 has it disabled by default and you have to toggle a bit in "Web
Service Extensions" to enable it
- IIS7 does not yet support WebDAV

Optionally, you can create any virtual directory structure/namespace
you want in IIS. That's the actual "web folder". That UI tab in
Explorer is hard-coded to create a virtual directory of that given
name off the root of the default website, but in reality it can be
anything.

Finally, you try to connect via WebDAV protocol to that "web folder"
via the name http://server/named-vdir


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

Re: programatically create webfolder

am 02.07.2007 20:24:06 von Jay

So, all I need is the 'virtual' folder in IIS, and it works?

Thanks, David!


"David Wang" wrote in message
news:1183395230.558031.244550@o11g2000prd.googlegroups.com.. .
> On Jul 2, 6:51 am, "Jay" wrote:
>> I am trying to create a web folder - not a network share you connect via
>> SMB, the kind that you connect to via WebDAV. In Explorer, there is tab
>> called 'web sharing' that you can manipulate to create this type of
>> 'share'.
>>
>> I want to do it via VBS/ADSI. I have spent much time on Google and
>> searching MSDN, but maybe I am looking for the wrong terms.
>>
>> Help?
>
>
> A "web folder" is just an HTTP-accessible URL namespace with WebDAV
> enabled.
>
> Thus, all you need to do is have WebDAV enabled on IIS, which varies
> depending on IIS version.
> - It is automatically enabled prior to IIS6 and difficult to disable
> - IIS6 has it disabled by default and you have to toggle a bit in "Web
> Service Extensions" to enable it
> - IIS7 does not yet support WebDAV
>
> Optionally, you can create any virtual directory structure/namespace
> you want in IIS. That's the actual "web folder". That UI tab in
> Explorer is hard-coded to create a virtual directory of that given
> name off the root of the default website, but in reality it can be
> anything.
>
> Finally, you try to connect via WebDAV protocol to that "web folder"
> via the name http://server/named-vdir
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>

Re: programatically create webfolder

am 02.07.2007 21:28:41 von Jay

I'm getting an error on the following line of my asp:

Set IIsWebVDirRootObj = GetObject("IIS://localhost/W3SVC/357126451/Root")

Microsoft VBScript runtime error '800a0046'

Permission denied: 'GetObject'

/create/create_webspace.asp, line 75

The user that is running this page has full access to the virtual website.

Thoughts?



"Jay" wrote in message
news:OA3c9YNvHHA.1168@TK2MSFTNGP02.phx.gbl...
> So, all I need is the 'virtual' folder in IIS, and it works?
>
> Thanks, David!
>
>
> "David Wang" wrote in message
> news:1183395230.558031.244550@o11g2000prd.googlegroups.com.. .
>> On Jul 2, 6:51 am, "Jay" wrote:
>>> I am trying to create a web folder - not a network share you connect via
>>> SMB, the kind that you connect to via WebDAV. In Explorer, there is tab
>>> called 'web sharing' that you can manipulate to create this type of
>>> 'share'.
>>>
>>> I want to do it via VBS/ADSI. I have spent much time on Google and
>>> searching MSDN, but maybe I am looking for the wrong terms.
>>>
>>> Help?
>>
>>
>> A "web folder" is just an HTTP-accessible URL namespace with WebDAV
>> enabled.
>>
>> Thus, all you need to do is have WebDAV enabled on IIS, which varies
>> depending on IIS version.
>> - It is automatically enabled prior to IIS6 and difficult to disable
>> - IIS6 has it disabled by default and you have to toggle a bit in "Web
>> Service Extensions" to enable it
>> - IIS7 does not yet support WebDAV
>>
>> Optionally, you can create any virtual directory structure/namespace
>> you want in IIS. That's the actual "web folder". That UI tab in
>> Explorer is hard-coded to create a virtual directory of that given
>> name off the root of the default website, but in reality it can be
>> anything.
>>
>> Finally, you try to connect via WebDAV protocol to that "web folder"
>> via the name http://server/named-vdir
>>
>>
>> //David
>> http://w3-4u.blogspot.com
>> http://blogs.msdn.com/David.Wang
>> //
>>
>

Re: programatically create webfolder

am 02.07.2007 22:23:31 von Jay

I have corrected the above as a permissions issue. My script will create
the folder and the virtual web folder in IIS.

However, it still doesn't show as a 'web folder'.

??

If I go into explorer and choose the 'web folder' tab, it works. Is there a
programatic way to do that? (or create that effect?)

Thanks


"Jay" wrote in message
news:eEV4D9NvHHA.2040@TK2MSFTNGP03.phx.gbl...
> I'm getting an error on the following line of my asp:
>
> Set IIsWebVDirRootObj = GetObject("IIS://localhost/W3SVC/357126451/Root")
>
> Microsoft VBScript runtime error '800a0046'
>
> Permission denied: 'GetObject'
>
> /create/create_webspace.asp, line 75
>
> The user that is running this page has full access to the virtual website.
>
> Thoughts?
>
>
>
> "Jay" wrote in message
> news:OA3c9YNvHHA.1168@TK2MSFTNGP02.phx.gbl...
>> So, all I need is the 'virtual' folder in IIS, and it works?
>>
>> Thanks, David!
>>
>>
>> "David Wang" wrote in message
>> news:1183395230.558031.244550@o11g2000prd.googlegroups.com.. .
>>> On Jul 2, 6:51 am, "Jay" wrote:
>>>> I am trying to create a web folder - not a network share you connect
>>>> via
>>>> SMB, the kind that you connect to via WebDAV. In Explorer, there is
>>>> tab
>>>> called 'web sharing' that you can manipulate to create this type of
>>>> 'share'.
>>>>
>>>> I want to do it via VBS/ADSI. I have spent much time on Google and
>>>> searching MSDN, but maybe I am looking for the wrong terms.
>>>>
>>>> Help?
>>>
>>>
>>> A "web folder" is just an HTTP-accessible URL namespace with WebDAV
>>> enabled.
>>>
>>> Thus, all you need to do is have WebDAV enabled on IIS, which varies
>>> depending on IIS version.
>>> - It is automatically enabled prior to IIS6 and difficult to disable
>>> - IIS6 has it disabled by default and you have to toggle a bit in "Web
>>> Service Extensions" to enable it
>>> - IIS7 does not yet support WebDAV
>>>
>>> Optionally, you can create any virtual directory structure/namespace
>>> you want in IIS. That's the actual "web folder". That UI tab in
>>> Explorer is hard-coded to create a virtual directory of that given
>>> name off the root of the default website, but in reality it can be
>>> anything.
>>>
>>> Finally, you try to connect via WebDAV protocol to that "web folder"
>>> via the name http://server/named-vdir
>>>
>>>
>>> //David
>>> http://w3-4u.blogspot.com
>>> http://blogs.msdn.com/David.Wang
>>> //
>>>
>>
>

Re: programatically create webfolder

am 02.07.2007 22:48:21 von Jay

1) IIS 6
2) WebDAV is ALLOWED
3) I create a folder within inetpub/wwwroot

I can't connect to it via WebDAV

If I go into Explorer under the 'web sharing' tab and 'share' it, I CAN
connect.

Basically I need to do this programatically.


"David Wang" wrote in message
news:1183395230.558031.244550@o11g2000prd.googlegroups.com.. .
> On Jul 2, 6:51 am, "Jay" wrote:
>> I am trying to create a web folder - not a network share you connect via
>> SMB, the kind that you connect to via WebDAV. In Explorer, there is tab
>> called 'web sharing' that you can manipulate to create this type of
>> 'share'.
>>
>> I want to do it via VBS/ADSI. I have spent much time on Google and
>> searching MSDN, but maybe I am looking for the wrong terms.
>>
>> Help?
>
>
> A "web folder" is just an HTTP-accessible URL namespace with WebDAV
> enabled.
>
> Thus, all you need to do is have WebDAV enabled on IIS, which varies
> depending on IIS version.
> - It is automatically enabled prior to IIS6 and difficult to disable
> - IIS6 has it disabled by default and you have to toggle a bit in "Web
> Service Extensions" to enable it
> - IIS7 does not yet support WebDAV
>
> Optionally, you can create any virtual directory structure/namespace
> you want in IIS. That's the actual "web folder". That UI tab in
> Explorer is hard-coded to create a virtual directory of that given
> name off the root of the default website, but in reality it can be
> anything.
>
> Finally, you try to connect via WebDAV protocol to that "web folder"
> via the name http://server/named-vdir
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>

Re: programatically create webfolder

am 02.07.2007 22:55:27 von Jay

If I create the virtual directory programtically, the metabase has this:

AccessFlags="AccessRead | AccessWrite" Path="e:\wwwroot\duffeyba" />

If I create it via the UI tab in explorer, it creates the following:

AccessFlags="AccessRead | AccessWrite" AppFriendlyName="duffeyba"
AppIsolated="2" AppRoot="/LM/W3SVC/357126451/Root/duffeyba"
AuthFlags="AuthNTLM" DirBrowseFlags="EnableDirBrowsing | DirBrowseShowDate |
DirBrowseShowTime | DirBrowseShowSize | DirBrowseShowExtension |
DirBrowseShowLongDate | EnableDefaultDoc" Path="E:\wwwroot\duffeyba" />

Seems that is a difference.

Jay


"Jay" wrote in message
news:eDf9kpOvHHA.4916@TK2MSFTNGP04.phx.gbl...
> 1) IIS 6
> 2) WebDAV is ALLOWED
> 3) I create a folder within inetpub/wwwroot
>
> I can't connect to it via WebDAV
>
> If I go into Explorer under the 'web sharing' tab and 'share' it, I CAN
> connect.
>
> Basically I need to do this programatically.
>
>
> "David Wang" wrote in message
> news:1183395230.558031.244550@o11g2000prd.googlegroups.com.. .
>> On Jul 2, 6:51 am, "Jay" wrote:
>>> I am trying to create a web folder - not a network share you connect via
>>> SMB, the kind that you connect to via WebDAV. In Explorer, there is tab
>>> called 'web sharing' that you can manipulate to create this type of
>>> 'share'.
>>>
>>> I want to do it via VBS/ADSI. I have spent much time on Google and
>>> searching MSDN, but maybe I am looking for the wrong terms.
>>>
>>> Help?
>>
>>
>> A "web folder" is just an HTTP-accessible URL namespace with WebDAV
>> enabled.
>>
>> Thus, all you need to do is have WebDAV enabled on IIS, which varies
>> depending on IIS version.
>> - It is automatically enabled prior to IIS6 and difficult to disable
>> - IIS6 has it disabled by default and you have to toggle a bit in "Web
>> Service Extensions" to enable it
>> - IIS7 does not yet support WebDAV
>>
>> Optionally, you can create any virtual directory structure/namespace
>> you want in IIS. That's the actual "web folder". That UI tab in
>> Explorer is hard-coded to create a virtual directory of that given
>> name off the root of the default website, but in reality it can be
>> anything.
>>
>> Finally, you try to connect via WebDAV protocol to that "web folder"
>> via the name http://server/named-vdir
>>
>>
>> //David
>> http://w3-4u.blogspot.com
>> http://blogs.msdn.com/David.Wang
>> //
>>
>

Re: programatically create webfolder

am 02.07.2007 23:19:46 von David Wang

Oh yeah, you also need to have DirBrowsing, "Script Code Access", and
"Write" permissions enabled (it seems that you figured some of them
out". Those are the per-vdir settings to allow WebDAV's "Translate: f"
to function and make a request to http://server/vdir/filename.ext to
retrieve the contents of the resource instead of executing it on the
server (if required).


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



On Jul 2, 1:55 pm, "Jay" wrote:
> If I create the virtual directory programtically, the metabase has this:
>
> > AccessFlags="AccessRead | AccessWrite" Path="e:\wwwroot\duffeyba" />
>
> If I create it via the UI tab in explorer, it creates the following:
>
> > AccessFlags="AccessRead | AccessWrite" AppFriendlyName="duffeyba"
> AppIsolated="2" AppRoot="/LM/W3SVC/357126451/Root/duffeyba"
> AuthFlags="AuthNTLM" DirBrowseFlags="EnableDirBrowsing | DirBrowseShowDate |
> DirBrowseShowTime | DirBrowseShowSize | DirBrowseShowExtension |
> DirBrowseShowLongDate | EnableDefaultDoc" Path="E:\wwwroot\duffeyba" />
>
> Seems that is a difference.
>
> Jay
>
> "Jay" wrote in message
>
> news:eDf9kpOvHHA.4916@TK2MSFTNGP04.phx.gbl...
>
>
>
> > 1) IIS 6
> > 2) WebDAV is ALLOWED
> > 3) I create a folder within inetpub/wwwroot
>
> > I can't connect to it via WebDAV
>
> > If I go into Explorer under the 'web sharing' tab and 'share' it, I CAN
> > connect.
>
> > Basically I need to do this programatically.
>
> > "David Wang" wrote in message
> >news:1183395230.558031.244550@o11g2000prd.googlegroups.com. ..
> >> On Jul 2, 6:51 am, "Jay" wrote:
> >>> I am trying to create a web folder - not a network share you connect via
> >>> SMB, the kind that you connect to via WebDAV. In Explorer, there is tab
> >>> called 'web sharing' that you can manipulate to create this type of
> >>> 'share'.
>
> >>> I want to do it via VBS/ADSI. I have spent much time on Google and
> >>> searching MSDN, but maybe I am looking for the wrong terms.
>
> >>> Help?
>
> >> A "web folder" is just an HTTP-accessible URL namespace with WebDAV
> >> enabled.
>
> >> Thus, all you need to do is have WebDAV enabled on IIS, which varies
> >> depending on IIS version.
> >> - It is automatically enabled prior to IIS6 and difficult to disable
> >> - IIS6 has it disabled by default and you have to toggle a bit in "Web
> >> Service Extensions" to enable it
> >> - IIS7 does not yet support WebDAV
>
> >> Optionally, you can create any virtual directory structure/namespace
> >> you want in IIS. That's the actual "web folder". That UI tab in
> >> Explorer is hard-coded to create a virtual directory of that given
> >> name off the root of the default website, but in reality it can be
> >> anything.
>
> >> Finally, you try to connect via WebDAV protocol to that "web folder"
> >> via the namehttp://server/named-vdir
>
> >> //David
> >>http://w3-4u.blogspot.com
> >>http://blogs.msdn.com/David.Wang
> >> //- Hide quoted text -
>
> - Show quoted text -

Re: programatically create webfolder

am 03.07.2007 14:28:23 von Jay

I'll try that! Thanks!


"David Wang" wrote in message
news:1183411186.868119.137290@z28g2000prd.googlegroups.com.. .
> Oh yeah, you also need to have DirBrowsing, "Script Code Access", and
> "Write" permissions enabled (it seems that you figured some of them
> out". Those are the per-vdir settings to allow WebDAV's "Translate: f"
> to function and make a request to http://server/vdir/filename.ext to
> retrieve the contents of the resource instead of executing it on the
> server (if required).
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>
>
>
> On Jul 2, 1:55 pm, "Jay" wrote:
>> If I create the virtual directory programtically, the metabase has this:
>>
>> >> AccessFlags="AccessRead | AccessWrite" Path="e:\wwwroot\duffeyba" />
>>
>> If I create it via the UI tab in explorer, it creates the following:
>>
>> >> AccessFlags="AccessRead | AccessWrite" AppFriendlyName="duffeyba"
>> AppIsolated="2" AppRoot="/LM/W3SVC/357126451/Root/duffeyba"
>> AuthFlags="AuthNTLM" DirBrowseFlags="EnableDirBrowsing |
>> DirBrowseShowDate |
>> DirBrowseShowTime | DirBrowseShowSize | DirBrowseShowExtension |
>> DirBrowseShowLongDate | EnableDefaultDoc" Path="E:\wwwroot\duffeyba" />
>>
>> Seems that is a difference.
>>
>> Jay
>>
>> "Jay" wrote in message
>>
>> news:eDf9kpOvHHA.4916@TK2MSFTNGP04.phx.gbl...
>>
>>
>>
>> > 1) IIS 6
>> > 2) WebDAV is ALLOWED
>> > 3) I create a folder within inetpub/wwwroot
>>
>> > I can't connect to it via WebDAV
>>
>> > If I go into Explorer under the 'web sharing' tab and 'share' it, I CAN
>> > connect.
>>
>> > Basically I need to do this programatically.
>>
>> > "David Wang" wrote in message
>> >news:1183395230.558031.244550@o11g2000prd.googlegroups.com. ..
>> >> On Jul 2, 6:51 am, "Jay" wrote:
>> >>> I am trying to create a web folder - not a network share you connect
>> >>> via
>> >>> SMB, the kind that you connect to via WebDAV. In Explorer, there is
>> >>> tab
>> >>> called 'web sharing' that you can manipulate to create this type of
>> >>> 'share'.
>>
>> >>> I want to do it via VBS/ADSI. I have spent much time on Google and
>> >>> searching MSDN, but maybe I am looking for the wrong terms.
>>
>> >>> Help?
>>
>> >> A "web folder" is just an HTTP-accessible URL namespace with WebDAV
>> >> enabled.
>>
>> >> Thus, all you need to do is have WebDAV enabled on IIS, which varies
>> >> depending on IIS version.
>> >> - It is automatically enabled prior to IIS6 and difficult to disable
>> >> - IIS6 has it disabled by default and you have to toggle a bit in "Web
>> >> Service Extensions" to enable it
>> >> - IIS7 does not yet support WebDAV
>>
>> >> Optionally, you can create any virtual directory structure/namespace
>> >> you want in IIS. That's the actual "web folder". That UI tab in
>> >> Explorer is hard-coded to create a virtual directory of that given
>> >> name off the root of the default website, but in reality it can be
>> >> anything.
>>
>> >> Finally, you try to connect via WebDAV protocol to that "web folder"
>> >> via the namehttp://server/named-vdir
>>
>> >> //David
>> >>http://w3-4u.blogspot.com
>> >>http://blogs.msdn.com/David.Wang
>> >> //- Hide quoted text -
>>
>> - Show quoted text -
>
>

Re: programatically create webfolder

am 03.07.2007 15:51:54 von Jay

I don't see an attribute in the metabase that matches the 'script code
access' - thoughts?

I can write adsi to try to make the metabase look exactly like it does when
I use the UI Web Sharing tab.

Thanks!

"David Wang" wrote in message
news:1183411186.868119.137290@z28g2000prd.googlegroups.com.. .
> Oh yeah, you also need to have DirBrowsing, "Script Code Access", and
> "Write" permissions enabled (it seems that you figured some of them
> out". Those are the per-vdir settings to allow WebDAV's "Translate: f"
> to function and make a request to http://server/vdir/filename.ext to
> retrieve the contents of the resource instead of executing it on the
> server (if required).
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>
>
>
> On Jul 2, 1:55 pm, "Jay" wrote:
>> If I create the virtual directory programtically, the metabase has this:
>>
>> >> AccessFlags="AccessRead | AccessWrite" Path="e:\wwwroot\duffeyba" />
>>
>> If I create it via the UI tab in explorer, it creates the following:
>>
>> >> AccessFlags="AccessRead | AccessWrite" AppFriendlyName="duffeyba"
>> AppIsolated="2" AppRoot="/LM/W3SVC/357126451/Root/duffeyba"
>> AuthFlags="AuthNTLM" DirBrowseFlags="EnableDirBrowsing |
>> DirBrowseShowDate |
>> DirBrowseShowTime | DirBrowseShowSize | DirBrowseShowExtension |
>> DirBrowseShowLongDate | EnableDefaultDoc" Path="E:\wwwroot\duffeyba" />
>>
>> Seems that is a difference.
>>
>> Jay
>>
>> "Jay" wrote in message
>>
>> news:eDf9kpOvHHA.4916@TK2MSFTNGP04.phx.gbl...
>>
>>
>>
>> > 1) IIS 6
>> > 2) WebDAV is ALLOWED
>> > 3) I create a folder within inetpub/wwwroot
>>
>> > I can't connect to it via WebDAV
>>
>> > If I go into Explorer under the 'web sharing' tab and 'share' it, I CAN
>> > connect.
>>
>> > Basically I need to do this programatically.
>>
>> > "David Wang" wrote in message
>> >news:1183395230.558031.244550@o11g2000prd.googlegroups.com. ..
>> >> On Jul 2, 6:51 am, "Jay" wrote:
>> >>> I am trying to create a web folder - not a network share you connect
>> >>> via
>> >>> SMB, the kind that you connect to via WebDAV. In Explorer, there is
>> >>> tab
>> >>> called 'web sharing' that you can manipulate to create this type of
>> >>> 'share'.
>>
>> >>> I want to do it via VBS/ADSI. I have spent much time on Google and
>> >>> searching MSDN, but maybe I am looking for the wrong terms.
>>
>> >>> Help?
>>
>> >> A "web folder" is just an HTTP-accessible URL namespace with WebDAV
>> >> enabled.
>>
>> >> Thus, all you need to do is have WebDAV enabled on IIS, which varies
>> >> depending on IIS version.
>> >> - It is automatically enabled prior to IIS6 and difficult to disable
>> >> - IIS6 has it disabled by default and you have to toggle a bit in "Web
>> >> Service Extensions" to enable it
>> >> - IIS7 does not yet support WebDAV
>>
>> >> Optionally, you can create any virtual directory structure/namespace
>> >> you want in IIS. That's the actual "web folder". That UI tab in
>> >> Explorer is hard-coded to create a virtual directory of that given
>> >> name off the root of the default website, but in reality it can be
>> >> anything.
>>
>> >> Finally, you try to connect via WebDAV protocol to that "web folder"
>> >> via the namehttp://server/named-vdir
>>
>> >> //David
>> >>http://w3-4u.blogspot.com
>> >>http://blogs.msdn.com/David.Wang
>> >> //- Hide quoted text -
>>
>> - Show quoted text -
>
>

Re: programatically create webfolder

am 03.07.2007 21:27:28 von David Wang

The property you need to be manipulating:
http://msdn2.microsoft.com/en-us/library/ms525016.aspx

Notice the attribute in metabase.xml file which is different is named
exactly the same as the ADSI Property in documentation.


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


On Jul 3, 6:51 am, "Jay" wrote:
> I don't see an attribute in the metabase that matches the 'script code
> access' - thoughts?
>
> I can write adsi to try to make the metabase look exactly like it does when
> I use the UI Web Sharing tab.
>
> Thanks!
>
> "David Wang" wrote in message
>
> news:1183411186.868119.137290@z28g2000prd.googlegroups.com.. .
>
>
>
> > Oh yeah, you also need to have DirBrowsing, "Script Code Access", and
> > "Write" permissions enabled (it seems that you figured some of them
> > out". Those are the per-vdir settings to allow WebDAV's "Translate: f"
> > to function and make a request tohttp://server/vdir/filename.extto
> > retrieve the contents of the resource instead of executing it on the
> > server (if required).
>
> > //David
> >http://w3-4u.blogspot.com
> >http://blogs.msdn.com/David.Wang
> > //
>
> > On Jul 2, 1:55 pm, "Jay" wrote:
> >> If I create the virtual directory programtically, the metabase has this:
>
> >> > >> AccessFlags="AccessRead | AccessWrite" Path="e:\wwwroot\duffeyba" />
>
> >> If I create it via the UI tab in explorer, it creates the following:
>
> >> > >> AccessFlags="AccessRead | AccessWrite" AppFriendlyName="duffeyba"
> >> AppIsolated="2" AppRoot="/LM/W3SVC/357126451/Root/duffeyba"
> >> AuthFlags="AuthNTLM" DirBrowseFlags="EnableDirBrowsing |
> >> DirBrowseShowDate |
> >> DirBrowseShowTime | DirBrowseShowSize | DirBrowseShowExtension |
> >> DirBrowseShowLongDate | EnableDefaultDoc" Path="E:\wwwroot\duffeyba" />
>
> >> Seems that is a difference.
>
> >> Jay
>
> >> "Jay" wrote in message
>
> >>news:eDf9kpOvHHA.4916@TK2MSFTNGP04.phx.gbl...
>
> >> > 1) IIS 6
> >> > 2) WebDAV is ALLOWED
> >> > 3) I create a folder within inetpub/wwwroot
>
> >> > I can't connect to it via WebDAV
>
> >> > If I go into Explorer under the 'web sharing' tab and 'share' it, I CAN
> >> > connect.
>
> >> > Basically I need to do this programatically.
>
> >> > "David Wang" wrote in message
> >> >news:1183395230.558031.244550@o11g2000prd.googlegroups.com. ..
> >> >> On Jul 2, 6:51 am, "Jay" wrote:
> >> >>> I am trying to create a web folder - not a network share you connect
> >> >>> via
> >> >>> SMB, the kind that you connect to via WebDAV. In Explorer, there is
> >> >>> tab
> >> >>> called 'web sharing' that you can manipulate to create this type of
> >> >>> 'share'.
>
> >> >>> I want to do it via VBS/ADSI. I have spent much time on Google and
> >> >>> searching MSDN, but maybe I am looking for the wrong terms.
>
> >> >>> Help?
>
> >> >> A "web folder" is just an HTTP-accessible URL namespace with WebDAV
> >> >> enabled.
>
> >> >> Thus, all you need to do is have WebDAV enabled on IIS, which varies
> >> >> depending on IIS version.
> >> >> - It is automatically enabled prior to IIS6 and difficult to disable
> >> >> - IIS6 has it disabled by default and you have to toggle a bit in "Web
> >> >> Service Extensions" to enable it
> >> >> - IIS7 does not yet support WebDAV
>
> >> >> Optionally, you can create any virtual directory structure/namespace
> >> >> you want in IIS. That's the actual "web folder". That UI tab in
> >> >> Explorer is hard-coded to create a virtual directory of that given
> >> >> name off the root of the default website, but in reality it can be
> >> >> anything.
>
> >> >> Finally, you try to connect via WebDAV protocol to that "web folder"
> >> >> via the namehttp://server/named-vdir
>
> >> >> //David
> >> >>http://w3-4u.blogspot.com
> >> >>http://blogs.msdn.com/David.Wang
> >> >> //- Hide quoted text -
>
> >> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

Re: programatically create webfolder

am 03.07.2007 22:46:25 von Jay

Excellent! I have made good progress with your insight.

Thanks!!


"David Wang" wrote in message
news:1183490848.787617.231570@i13g2000prf.googlegroups.com.. .
> The property you need to be manipulating:
> http://msdn2.microsoft.com/en-us/library/ms525016.aspx
>
> Notice the attribute in metabase.xml file which is different is named
> exactly the same as the ADSI Property in documentation.
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>
>
> On Jul 3, 6:51 am, "Jay" wrote:
>> I don't see an attribute in the metabase that matches the 'script code
>> access' - thoughts?
>>
>> I can write adsi to try to make the metabase look exactly like it does
>> when
>> I use the UI Web Sharing tab.
>>
>> Thanks!
>>
>> "David Wang" wrote in message
>>
>> news:1183411186.868119.137290@z28g2000prd.googlegroups.com.. .
>>
>>
>>
>> > Oh yeah, you also need to have DirBrowsing, "Script Code Access", and
>> > "Write" permissions enabled (it seems that you figured some of them
>> > out". Those are the per-vdir settings to allow WebDAV's "Translate: f"
>> > to function and make a request tohttp://server/vdir/filename.extto
>> > retrieve the contents of the resource instead of executing it on the
>> > server (if required).
>>
>> > //David
>> >http://w3-4u.blogspot.com
>> >http://blogs.msdn.com/David.Wang
>> > //
>>
>> > On Jul 2, 1:55 pm, "Jay" wrote:
>> >> If I create the virtual directory programtically, the metabase has
>> >> this:
>>
>> >> >> >> AccessFlags="AccessRead | AccessWrite" Path="e:\wwwroot\duffeyba" />
>>
>> >> If I create it via the UI tab in explorer, it creates the following:
>>
>> >> >> >> AccessFlags="AccessRead | AccessWrite" AppFriendlyName="duffeyba"
>> >> AppIsolated="2" AppRoot="/LM/W3SVC/357126451/Root/duffeyba"
>> >> AuthFlags="AuthNTLM" DirBrowseFlags="EnableDirBrowsing |
>> >> DirBrowseShowDate |
>> >> DirBrowseShowTime | DirBrowseShowSize | DirBrowseShowExtension |
>> >> DirBrowseShowLongDate | EnableDefaultDoc" Path="E:\wwwroot\duffeyba"
>> >> />
>>
>> >> Seems that is a difference.
>>
>> >> Jay
>>
>> >> "Jay" wrote in message
>>
>> >>news:eDf9kpOvHHA.4916@TK2MSFTNGP04.phx.gbl...
>>
>> >> > 1) IIS 6
>> >> > 2) WebDAV is ALLOWED
>> >> > 3) I create a folder within inetpub/wwwroot
>>
>> >> > I can't connect to it via WebDAV
>>
>> >> > If I go into Explorer under the 'web sharing' tab and 'share' it, I
>> >> > CAN
>> >> > connect.
>>
>> >> > Basically I need to do this programatically.
>>
>> >> > "David Wang" wrote in message
>> >> >news:1183395230.558031.244550@o11g2000prd.googlegroups.com. ..
>> >> >> On Jul 2, 6:51 am, "Jay" wrote:
>> >> >>> I am trying to create a web folder - not a network share you
>> >> >>> connect
>> >> >>> via
>> >> >>> SMB, the kind that you connect to via WebDAV. In Explorer, there
>> >> >>> is
>> >> >>> tab
>> >> >>> called 'web sharing' that you can manipulate to create this type
>> >> >>> of
>> >> >>> 'share'.
>>
>> >> >>> I want to do it via VBS/ADSI. I have spent much time on Google
>> >> >>> and
>> >> >>> searching MSDN, but maybe I am looking for the wrong terms.
>>
>> >> >>> Help?
>>
>> >> >> A "web folder" is just an HTTP-accessible URL namespace with WebDAV
>> >> >> enabled.
>>
>> >> >> Thus, all you need to do is have WebDAV enabled on IIS, which
>> >> >> varies
>> >> >> depending on IIS version.
>> >> >> - It is automatically enabled prior to IIS6 and difficult to
>> >> >> disable
>> >> >> - IIS6 has it disabled by default and you have to toggle a bit in
>> >> >> "Web
>> >> >> Service Extensions" to enable it
>> >> >> - IIS7 does not yet support WebDAV
>>
>> >> >> Optionally, you can create any virtual directory
>> >> >> structure/namespace
>> >> >> you want in IIS. That's the actual "web folder". That UI tab in
>> >> >> Explorer is hard-coded to create a virtual directory of that given
>> >> >> name off the root of the default website, but in reality it can be
>> >> >> anything.
>>
>> >> >> Finally, you try to connect via WebDAV protocol to that "web
>> >> >> folder"
>> >> >> via the namehttp://server/named-vdir
>>
>> >> >> //David
>> >> >>http://w3-4u.blogspot.com
>> >> >>http://blogs.msdn.com/David.Wang
>> >> >> //- Hide quoted text -
>>
>> >> - Show quoted text -- Hide quoted text -
>>
>> - Show quoted text -
>
>

Re: programatically create webfolder

am 14.07.2007 05:00:01 von JoeVidanes

Jay,
I am also trying to create a webfolder automatically for all users. Can you
share what solution you ended up doing? Ideally, a vb script was what I was
seeking. Your help is much appreciated. Thanks

"Jay" wrote:

> Excellent! I have made good progress with your insight.
>
> Thanks!!
>
>
> "David Wang" wrote in message
> news:1183490848.787617.231570@i13g2000prf.googlegroups.com.. .
> > The property you need to be manipulating:
> > http://msdn2.microsoft.com/en-us/library/ms525016.aspx
> >
> > Notice the attribute in metabase.xml file which is different is named
> > exactly the same as the ADSI Property in documentation.
> >
> >
> > //David
> > http://w3-4u.blogspot.com
> > http://blogs.msdn.com/David.Wang
> > //
> >
> >
> > On Jul 3, 6:51 am, "Jay" wrote:
> >> I don't see an attribute in the metabase that matches the 'script code
> >> access' - thoughts?
> >>
> >> I can write adsi to try to make the metabase look exactly like it does
> >> when
> >> I use the UI Web Sharing tab.
> >>
> >> Thanks!
> >>
> >> "David Wang" wrote in message
> >>
> >> news:1183411186.868119.137290@z28g2000prd.googlegroups.com.. .
> >>
> >>
> >>
> >> > Oh yeah, you also need to have DirBrowsing, "Script Code Access", and
> >> > "Write" permissions enabled (it seems that you figured some of them
> >> > out". Those are the per-vdir settings to allow WebDAV's "Translate: f"
> >> > to function and make a request tohttp://server/vdir/filename.extto
> >> > retrieve the contents of the resource instead of executing it on the
> >> > server (if required).
> >>
> >> > //David
> >> >http://w3-4u.blogspot.com
> >> >http://blogs.msdn.com/David.Wang
> >> > //
> >>
> >> > On Jul 2, 1:55 pm, "Jay" wrote:
> >> >> If I create the virtual directory programtically, the metabase has
> >> >> this:
> >>
> >> >> > >> >> AccessFlags="AccessRead | AccessWrite" Path="e:\wwwroot\duffeyba" />
> >>
> >> >> If I create it via the UI tab in explorer, it creates the following:
> >>
> >> >> > >> >> AccessFlags="AccessRead | AccessWrite" AppFriendlyName="duffeyba"
> >> >> AppIsolated="2" AppRoot="/LM/W3SVC/357126451/Root/duffeyba"
> >> >> AuthFlags="AuthNTLM" DirBrowseFlags="EnableDirBrowsing |
> >> >> DirBrowseShowDate |
> >> >> DirBrowseShowTime | DirBrowseShowSize | DirBrowseShowExtension |
> >> >> DirBrowseShowLongDate | EnableDefaultDoc" Path="E:\wwwroot\duffeyba"
> >> >> />
> >>
> >> >> Seems that is a difference.
> >>
> >> >> Jay
> >>
> >> >> "Jay" wrote in message
> >>
> >> >>news:eDf9kpOvHHA.4916@TK2MSFTNGP04.phx.gbl...
> >>
> >> >> > 1) IIS 6
> >> >> > 2) WebDAV is ALLOWED
> >> >> > 3) I create a folder within inetpub/wwwroot
> >>
> >> >> > I can't connect to it via WebDAV
> >>
> >> >> > If I go into Explorer under the 'web sharing' tab and 'share' it, I
> >> >> > CAN
> >> >> > connect.
> >>
> >> >> > Basically I need to do this programatically.
> >>
> >> >> > "David Wang" wrote in message
> >> >> >news:1183395230.558031.244550@o11g2000prd.googlegroups.com. ..
> >> >> >> On Jul 2, 6:51 am, "Jay" wrote:
> >> >> >>> I am trying to create a web folder - not a network share you
> >> >> >>> connect
> >> >> >>> via
> >> >> >>> SMB, the kind that you connect to via WebDAV. In Explorer, there
> >> >> >>> is
> >> >> >>> tab
> >> >> >>> called 'web sharing' that you can manipulate to create this type
> >> >> >>> of
> >> >> >>> 'share'.
> >>
> >> >> >>> I want to do it via VBS/ADSI. I have spent much time on Google
> >> >> >>> and
> >> >> >>> searching MSDN, but maybe I am looking for the wrong terms.
> >>
> >> >> >>> Help?
> >>
> >> >> >> A "web folder" is just an HTTP-accessible URL namespace with WebDAV
> >> >> >> enabled.
> >>
> >> >> >> Thus, all you need to do is have WebDAV enabled on IIS, which
> >> >> >> varies
> >> >> >> depending on IIS version.
> >> >> >> - It is automatically enabled prior to IIS6 and difficult to
> >> >> >> disable
> >> >> >> - IIS6 has it disabled by default and you have to toggle a bit in
> >> >> >> "Web
> >> >> >> Service Extensions" to enable it
> >> >> >> - IIS7 does not yet support WebDAV
> >>
> >> >> >> Optionally, you can create any virtual directory
> >> >> >> structure/namespace
> >> >> >> you want in IIS. That's the actual "web folder". That UI tab in
> >> >> >> Explorer is hard-coded to create a virtual directory of that given
> >> >> >> name off the root of the default website, but in reality it can be
> >> >> >> anything.
> >>
> >> >> >> Finally, you try to connect via WebDAV protocol to that "web
> >> >> >> folder"
> >> >> >> via the namehttp://server/named-vdir
> >>
> >> >> >> //David
> >> >> >>http://w3-4u.blogspot.com
> >> >> >>http://blogs.msdn.com/David.Wang
> >> >> >> //- Hide quoted text -
> >>
> >> >> - Show quoted text -- Hide quoted text -
> >>
> >> - Show quoted text -
> >
> >
>
>

Re: programatically create webfolder

am 29.08.2007 16:54:53 von Jay

This is what I came up with, I hope it helps:


lcv = 0

Set fsoOutput = CreateObject("Scripting.FileSystemObject")
Set fOut = fsoOutput.CreateTextFile("C:\compare.txt", TRUE)
Set oContainer = GetObject("LDAP://OU=Students,OU=People,DC=xxx,DC=xxx")
Set fsoObj = WScript.CreateObject("Scripting.FileSystemObject")

'On Error Resume Next
fOut.Write("SCRIPT STARTED: " & NOW() & vbcrlf)
For Each oUser In oContainer

If oUser.Description = "Registered Student" Then

'VERIFY FOLDER
strPath = "E:\inetpub\wwwroot\" & oUser.samaccountname

If NOT fsoObj.FolderExists(strPath) Then

fOut.Write(oUser.samaccountname & " has no folder - creating now" &
vbcrlf)

fsoOutput.CreateFolder(strPath)
'----------------------------------------------------------- ------------------------------------------


' Set Sec = CreateObject("ADsSecurity")
' Set secDesc = Sec.GetSecurityDescriptor("FILE://" & strPath)
' Set DACL = secDesc.DiscretionaryAcl


' "Full" {$ace.AccessMask = 2032127}
' "Change" {$ace.AccessMask = 1245631}
' "Read" {$ace.AccessMask = 1179817}

'-- Add user to ACL --
' Set ACE = CreateObject("AccessControlEntry")
' ACE.Trustee = strDomain & "\" & oUser.samaccountname
' ACE.AccessMask = 1245631
' ACE.AceFlags = 3
' ACE.AceType = 0

' DACL.AddAce ace
' secDesc.DiscretionaryAcl = DACL
' Sec.SetSecurityDescriptor secDesc

' Set DACL = Nothing
' Set SecDec = Nothing
' Set Sec = Nothing

'----------------------------------------------------------- ----




Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")



objShell.run("cscript.exe c:\windows\xcacls.vbs e:\inetpub\wwwroot\" &
oUser.samaccountname & " /g longwood\" & oUser.samaccountname & ":M /e"),4


set objShell = Nothing



on error resume next


' Create an instance of the virtual directory object
' that represents the default Web site.

'Set IIsWebVDirRootObj =
GetObject("IIS://localhost/W3SVC/357126451/Root")
Set IIsWebVDirRootObj =
GetObject("IIS://localhost/W3SVC/1914240609/Root")
Set IIsWebVDirObj = IIsWebVDirRootObj.Create("IIsWebVirtualDir",
oUser.samaccountname)
IIsWebVDirObj.Put "Path", strPath
IIsWebVDirObj.Put "AccessRead", True
IIsWebVDirObj.Put "AccessWrite", True
IIsWebVDirObj.Put "AccessScript", False
IIsWebVDirObj.Put "EnableDirBrowsing", True
IIsWebVDirObj.Put "DirBrowseShowDate", True
IIsWebVDirObj.Put "DirBrowseShowTime", True
IIsWebVDirObj.Put "DirBrowseShowSize", True
IIsWebVDirObj.Put "DirBrowseShowExtension", True
IIsWebVDirObj.Put "DirBrowseShowLongDate", True
IIsWebVDirObj.Put "EnableDefaultDoc", True

IIsWebVDirObj.AccessSSL = True
IIsWebVDirObj.AccessSSL128 = True

IIsWebVDirObj.AuthAnonymous = False
IIsWebVDirObj.AuthBasic = True
IIsWebVDirObj.DefaultLogonDomain = "xxx.edu"
IIsWebVDirObj.SetInfo

on error goto 0

wscript.sleep (2000)

'----------------------------------------------------------- ---------------

Else

'fOut.Write(oUser.samaccountname & " has a folder" & vbcrlf)

End If

End If

Next

fOut.Write("SCRIPT ENDED: " & NOW() & vbcrlf)

fOut.Close

Set fsoObj = Nothing
Set oUser = Nothing
Set oContainer = Nothing
Set fOut = Nothing
set fsoOutput = Nothing

"Joe Vidanes" wrote in message
news:0FDF6D54-6A89-4E70-973F-638F50323C77@microsoft.com...
> Jay,
> I am also trying to create a webfolder automatically for all users. Can
> you
> share what solution you ended up doing? Ideally, a vb script was what I
> was
> seeking. Your help is much appreciated. Thanks
>
> "Jay" wrote:
>
>> Excellent! I have made good progress with your insight.
>>
>> Thanks!!
>>
>>
>> "David Wang" wrote in message
>> news:1183490848.787617.231570@i13g2000prf.googlegroups.com.. .
>> > The property you need to be manipulating:
>> > http://msdn2.microsoft.com/en-us/library/ms525016.aspx
>> >
>> > Notice the attribute in metabase.xml file which is different is named
>> > exactly the same as the ADSI Property in documentation.
>> >
>> >
>> > //David
>> > http://w3-4u.blogspot.com
>> > http://blogs.msdn.com/David.Wang
>> > //
>> >
>> >
>> > On Jul 3, 6:51 am, "Jay" wrote:
>> >> I don't see an attribute in the metabase that matches the 'script code
>> >> access' - thoughts?
>> >>
>> >> I can write adsi to try to make the metabase look exactly like it does
>> >> when
>> >> I use the UI Web Sharing tab.
>> >>
>> >> Thanks!
>> >>
>> >> "David Wang" wrote in message
>> >>
>> >> news:1183411186.868119.137290@z28g2000prd.googlegroups.com.. .
>> >>
>> >>
>> >>
>> >> > Oh yeah, you also need to have DirBrowsing, "Script Code Access",
>> >> > and
>> >> > "Write" permissions enabled (it seems that you figured some of them
>> >> > out". Those are the per-vdir settings to allow WebDAV's "Translate:
>> >> > f"
>> >> > to function and make a request tohttp://server/vdir/filename.extto
>> >> > retrieve the contents of the resource instead of executing it on the
>> >> > server (if required).
>> >>
>> >> > //David
>> >> >http://w3-4u.blogspot.com
>> >> >http://blogs.msdn.com/David.Wang
>> >> > //
>> >>
>> >> > On Jul 2, 1:55 pm, "Jay" wrote:
>> >> >> If I create the virtual directory programtically, the metabase has
>> >> >> this:
>> >>
>> >> >> >> >> >> AccessFlags="AccessRead | AccessWrite" Path="e:\wwwroot\duffeyba"
>> >> >> />
>> >>
>> >> >> If I create it via the UI tab in explorer, it creates the
>> >> >> following:
>> >>
>> >> >> >> >> >> AccessFlags="AccessRead | AccessWrite" AppFriendlyName="duffeyba"
>> >> >> AppIsolated="2" AppRoot="/LM/W3SVC/357126451/Root/duffeyba"
>> >> >> AuthFlags="AuthNTLM" DirBrowseFlags="EnableDirBrowsing |
>> >> >> DirBrowseShowDate |
>> >> >> DirBrowseShowTime | DirBrowseShowSize | DirBrowseShowExtension |
>> >> >> DirBrowseShowLongDate | EnableDefaultDoc"
>> >> >> Path="E:\wwwroot\duffeyba"
>> >> >> />
>> >>
>> >> >> Seems that is a difference.
>> >>
>> >> >> Jay
>> >>
>> >> >> "Jay" wrote in message
>> >>
>> >> >>news:eDf9kpOvHHA.4916@TK2MSFTNGP04.phx.gbl...
>> >>
>> >> >> > 1) IIS 6
>> >> >> > 2) WebDAV is ALLOWED
>> >> >> > 3) I create a folder within inetpub/wwwroot
>> >>
>> >> >> > I can't connect to it via WebDAV
>> >>
>> >> >> > If I go into Explorer under the 'web sharing' tab and 'share' it,
>> >> >> > I
>> >> >> > CAN
>> >> >> > connect.
>> >>
>> >> >> > Basically I need to do this programatically.
>> >>
>> >> >> > "David Wang" wrote in message
>> >> >> >news:1183395230.558031.244550@o11g2000prd.googlegroups.com. ..
>> >> >> >> On Jul 2, 6:51 am, "Jay" wrote:
>> >> >> >>> I am trying to create a web folder - not a network share you
>> >> >> >>> connect
>> >> >> >>> via
>> >> >> >>> SMB, the kind that you connect to via WebDAV. In Explorer,
>> >> >> >>> there
>> >> >> >>> is
>> >> >> >>> tab
>> >> >> >>> called 'web sharing' that you can manipulate to create this
>> >> >> >>> type
>> >> >> >>> of
>> >> >> >>> 'share'.
>> >>
>> >> >> >>> I want to do it via VBS/ADSI. I have spent much time on Google
>> >> >> >>> and
>> >> >> >>> searching MSDN, but maybe I am looking for the wrong terms.
>> >>
>> >> >> >>> Help?
>> >>
>> >> >> >> A "web folder" is just an HTTP-accessible URL namespace with
>> >> >> >> WebDAV
>> >> >> >> enabled.
>> >>
>> >> >> >> Thus, all you need to do is have WebDAV enabled on IIS, which
>> >> >> >> varies
>> >> >> >> depending on IIS version.
>> >> >> >> - It is automatically enabled prior to IIS6 and difficult to
>> >> >> >> disable
>> >> >> >> - IIS6 has it disabled by default and you have to toggle a bit
>> >> >> >> in
>> >> >> >> "Web
>> >> >> >> Service Extensions" to enable it
>> >> >> >> - IIS7 does not yet support WebDAV
>> >>
>> >> >> >> Optionally, you can create any virtual directory
>> >> >> >> structure/namespace
>> >> >> >> you want in IIS. That's the actual "web folder". That UI tab in
>> >> >> >> Explorer is hard-coded to create a virtual directory of that
>> >> >> >> given
>> >> >> >> name off the root of the default website, but in reality it can
>> >> >> >> be
>> >> >> >> anything.
>> >>
>> >> >> >> Finally, you try to connect via WebDAV protocol to that "web
>> >> >> >> folder"
>> >> >> >> via the namehttp://server/named-vdir
>> >>
>> >> >> >> //David
>> >> >> >>http://w3-4u.blogspot.com
>> >> >> >>http://blogs.msdn.com/David.Wang
>> >> >> >> //- Hide quoted text -
>> >>
>> >> >> - Show quoted text -- Hide quoted text -
>> >>
>> >> - Show quoted text -
>> >
>> >
>>
>>