IT Community - Software Programming, Web Development and Technical Support

Build and configure IIS website using C#

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 =”...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #1  
Old 07-15-2007, 11:52 PM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 881
kingmaker is on a distinguished road
Send a message via MSN to kingmaker
Default Build and configure IIS website using C#

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 +":");
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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


All times are GMT -7. The time now is 01:32 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0