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 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-15-2007, 11:52 PM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo 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
Sponsored Links
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 On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/c-programming/1729-build-configure-iis-website-using-c.html
Posted By For Type Date
Build and configure IIS website using C# | Web Hosting This thread Refback 02-20-2008 01:59 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Build vigneshgets Software Testing 1 01-15-2008 10:00 PM
How to configure silver light in asp.net sathian ASP and ASP.NET Programming 2 11-20-2007 09:21 AM
In Microsoft Surface Website. Why they have used Adobe Flash in their website instead theone Microsoft 1 07-27-2007 06:12 AM
How can we configure a .NET Remoting object via XML file? mobilegeek C# Programming 1 07-24-2007 06:46 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 09:15 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0