iis 7 - Creating virtual directories within another virtual directory using C# -


I created a Windows service app that knows how to create a virtual directory in the original folder of IIS (7.5).

And this code is:

System.EnterpriseServices.Internal.IISVirtualRoot vr = new System.EnterpriseServices.Internal.IISVirtualRoot ();

string sError = "";

vr.Create ("IIS: // localhost / W3SVC / 1 / root", physicalPath, virtualDirectoryName, sError outside);

This works perfecly

Now, to say that I have created a virtual dealer named MyVDir in the root folder, and then I want to create another virtual dior, as above, with the same C # function - MyVDir virtual directory (create nested virtual directory). What should I do?

Something like vr.Create ("IIS: // localhost / W3SVC / 1 / root / MyVDir", physical path, virtual directory name, sError outside); doesn

thanks for all!

is not a work for me, and a 'path can not be found'

Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -