Board index » Web Programming » How to Enable Anonmous Access to a File under a Site
|
Adrian#
|
How to Enable Anonmous Access to a File under a Site
Web Programming282
Hi, I need a help regarding configuring IIS programmatically using VB / VB Script. I have created a WebSite in IIS using VB and even enabled Windows Authencation for that site. But now, for a File and Folder alone, I want to enable the Anonymous Access. I could not able to do that, I have tried many options. This Exapmle scripts I got from Microsoft.com: 'Get a directory subordinate to the Web server root. Set VDirObj = GetObject("IIS://MyComputer/W3SVC/1/Root/Vdir1/Dir1a") 'Overwrite the inherited value for write access 'by using the dot method equivalent to Put. VDirObj.AccessWrite = True 'Save the changed value to the metabase. VDirObj.SetInfo I tried the same code in my scripts: strFullVirtualDirectoryPath = "IIS://localhost/W3SVC/3/Root/VPM/Menu.asp" Set objWebFileOrFolder = GetObject(strFullVirtualDirectoryPath) The object fails to create saying, "Automation error The system cannot find the path specified. " The given path is right. I can able to create object till the Virtual Directory, but not to its folder or any file inside Virtual Directory. If any of you have any sample scripts or know how to do that pls help me. Thanks in Advance Vivek -- vikky_25 ------------------------------------------------------------------------ Posted via www.webservertalk.com ------------------------------------------------------------------------ View this thread: www.webservertalk.com/message1039796.html - |
