This is a discussion on Build and configure IIS website using C# within the C# Programming forums, part of the Software Development category; Build and configure IIS website using C# Microsoft supports System.DirectoryServices namespace to access IIS.The IIS path is IIsW3SvcPath =”...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Build and configure IIS website using C# Microsoft supports System.DirectoryServices namespace to access IIS.The IIS path is IIsW3SvcPath =”IIS://localhost/W3SVC” Directory Entry Class is used to connect W3SVC DirectoryEntry root = new DirectoryEntry(IIsW3SvcPath); • To find the entries in IIS through using this foreach foreach(DirectoryEntry e in root.Children) {} • Invoke is passed as argument command to create websites DirectoryEntry site = DirectoryEntry)root.Invoke("Create", IIsConstants.IIsWebServerName, siteID); • Using Invoke method to set the properties site.Invoke("Put", "ServerComment", name); site.Invoke("Put", "KeyType", IIsConstants.IIsWebServerName); site.Invoke("Put", "ServerBindings", ":" + port.ToString() + ":"); site.Invoke("Put", "ServerState", 1); site.Invoke("Put", "FrontPageWeb", 1); site.Invoke("Put", "DefaultDoc", "default.aspx"); site.Invoke("Put", "SecureBindings", ":"+sslport +":"); |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to configure Wi-Fi | raj01 | Networking & Internet Connectivity | 1 | 05-04-2009 09:04 AM |
| 5 Tips to build an affordable Video On Demand website | BenR41 | Technology BUZZzzzzz | 0 | 04-16-2008 12:55 PM |
| Build | vigneshgets | Software Testing | 1 | 01-15-2008 10:00 PM |
| In Microsoft Surface Website. Why they have used Adobe Flash in their website instead | theone | Microsoft | 1 | 07-27-2007 06:12 AM |
| How to Configure the ASP.NET version for Each website(developed 1.0,1.1) | oxygen | ASP and ASP.NET Programming | 1 | 07-20-2007 04:45 AM |
Our Partners |