Gnat Posted July 20, 2007 Share Posted July 20, 2007 I have only read a couple of topics on this subject, but they didn't really cover everything that I was hoping for. I am trying to find out if there is a way to create a virtual directory on a remote IIS server and have that virtual directory be a redirect to another site. I found a URL (http://www.codeproject.com/csharp/VirtualDirectoryCreation.asp) of how to do this in C#, but I don't know the language, and cannot customize it for my purposes. Any help in the right direction would be appreciated...and code snippets would be even more appreciated. Thanx Link to comment Share on other sites More sharing options...
Gnat Posted July 20, 2007 Author Share Posted July 20, 2007 OK, I have the VBS code that works...actually did that part myself...anyway, I am terrible at translating vbs into AutoIT, can someone please help... Thanx Set Root = GetObject("IIS://servername/W3SVC/7458/ROOT") if (Err.Number <> 0) then wscript.Quit end if Set Dir = Root.Create("IIsWebVirtualDir", "Test") Dir.Path = "C:\ " Dir.AccessRead = True Dir.AccessWrite = False Dir.EnableDirBrowsing = False Dir.AppFriendlyName = "Test" Dir.httpredirect = "http://localhost/website/project.aspx?projectID=217" Dir.SetInfo Set Dir = Nothing Set Root = Nothing Link to comment Share on other sites More sharing options...
NELyon Posted July 21, 2007 Share Posted July 21, 2007 $Root = ObjGet("IIS://servername/W3SVC/7458/ROOT") If Not IsObj($Root) Then Exit EndIf $Dir = $Root.Create("IIsWebVirtualDir", "Test") $Dir.Path = "C:\" $Dir.AccessRead = True $Dir.AccessWrite = False $Dir.EnableDirBrowsing = False $Dir.AppFriendlyName = "Test" $Dir.httpredirect = "http://localhost/website/project.aspx?projectID=217" $Dir.SetInfo Link to comment Share on other sites More sharing options...
Gnat Posted July 21, 2007 Author Share Posted July 21, 2007 That code conversion works perfectly...Thanks for the help Senton-Bomb! Link to comment Share on other sites More sharing options...
NELyon Posted July 21, 2007 Share Posted July 21, 2007 No Problem Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now