This is kind of an advanced problem, hopefully one of you asp/VB gurus will have a suggestion. I am trying to dynamically set a folder's execute permissions in IIS6 from an asp page. I have given the server full permissions to make the changes necessary. When I run the code I get:
Microsoft VBScript runtime error '800a0046'
Permission denied: 'GetObject'
/learning.asp, line 11
I have a server setup with IIS6 running a couple asp websites. I use a code like this to create a folder called "files"
set fso = Server.CreateObject("Scripting.FileSystemObject")
set folder3 = fso.CreateFolder(Server.MapPath(username & "/files"))
set folder3 = nothing
set fso = nothing
Works fine and creates the files folder just where I want it. However, the new folder has execute permissions set to "scripts and exe's" and I need it to be "never" or false. There is a system object that you can call to make this change, and I even have a piece of code that I wrote after reading another tutorial.
It doesn't work and gives the above error. I think, maybe, I am just leaving something out, but this stuff is a little over my head. Here is what I used, but I don't know the syntax or what exactly to call.
Set root = GetObject("IIS://localhost/" & username)
Set newVDir = root.Create("IIsWebVirtualDir","files")
newVDir.Path = "e:\iis3\server2\ADSI"
newVDir.AccessScript = False
newVDir.SetInfo
I have searched around for 3 days trying to find a solution to this, but not very many people do this type of thing apparently, because there are no posts about it that I can find.
Anyway, I don't understand what the getobject is supposed to do, and what newVDir.path I am supposed to be using?
Thank you, in advance, for any helpful suggestions you may have.