A Ably+ May 13, 2005 #1 Is possible to create virtual directories in IIS through code? If yes, is there some example? Thanks in advance.
Is possible to create virtual directories in IIS through code? If yes, is there some example? Thanks in advance.
P Piotr Szczytowski May 13, 2005 #2 HI, Yes it is possible and it is pretty easy: using System.EnterpriseServices.Internal; IISVirtualRoot vr = new IISVirtualRoot(); string strError; vr.Create("IIS://localhost/W3SVC/1/Root",storageDirectory,virtualPath, out strError); Do not forget to add System.EnterpriseServices to your app Best raegards, Piotr Szczytowski
HI, Yes it is possible and it is pretty easy: using System.EnterpriseServices.Internal; IISVirtualRoot vr = new IISVirtualRoot(); string strError; vr.Create("IIS://localhost/W3SVC/1/Root",storageDirectory,virtualPath, out strError); Do not forget to add System.EnterpriseServices to your app Best raegards, Piotr Szczytowski
W Willy Denoyette [MVP] May 13, 2005 #3 This is BAD advise, read the docs first . IISVirtualRoot This member supports the .NET Framework infrastructure and is not intended to be used directly from your code. You should use the System.Management namespace for this.Willy."Piotr
This is BAD advise, read the docs first . IISVirtualRoot This member supports the .NET Framework infrastructure and is not intended to be used directly from your code. You should use the System.Management namespace for this.Willy."Piotr
W Willy Denoyette [MVP] May 13, 2005 #4 Ably+ said: Is possible to create virtual directories in IIS through code? If yes, is there some example? Thanks in advance. Click to expand... Check MSDN online : http://msdn.microsoft.com/library/d...html/504d8e75-4a12-433b-8894-ac7fd414a634.asp Willy.
Ably+ said: Is possible to create virtual directories in IIS through code? If yes, is there some example? Thanks in advance. Click to expand... Check MSDN online : http://msdn.microsoft.com/library/d...html/504d8e75-4a12-433b-8894-ac7fd414a634.asp Willy.
W Willy Denoyette [MVP] May 13, 2005 #5 Ably+ said: Is possible to create virtual directories in IIS through code? If yes, is there some example? Thanks in advance. Click to expand... When administrating IIS6, you better use System.Management namespace classes and WMI http://msdn.microsoft.com/library/d...html/d8cc269a-5889-435f-a654-735c99b2e0fc.asp Willy.
Ably+ said: Is possible to create virtual directories in IIS through code? If yes, is there some example? Thanks in advance. Click to expand... When administrating IIS6, you better use System.Management namespace classes and WMI http://msdn.microsoft.com/library/d...html/d8cc269a-5889-435f-a654-735c99b2e0fc.asp Willy.