| | |
host header on iis programmatically
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2005
Posts: 8
Reputation:
Solved Threads: 0
i wanna know how to add a host header to the sirt already created
in fact i created the site programmtically and i used that code to add host header on that site during creation :
DirectoryEntry site = (DirectoryEntry)objIISRoot.Invoke("Create", "IIsWebServer", siteID);
object[] hosts = {this.Server_IP + ":80:" + webSiteName, this.Server_IP + ":80:www." + webSiteName};
site.Invoke("Put", "ServerBindings", hosts);
but the problem is : i cannot get the site again and add to it the host header
in fact i created the site programmtically and i used that code to add host header on that site during creation :
DirectoryEntry site = (DirectoryEntry)objIISRoot.Invoke("Create", "IIsWebServer", siteID);
object[] hosts = {this.Server_IP + ":80:" + webSiteName, this.Server_IP + ":80:www." + webSiteName};
site.Invoke("Put", "ServerBindings", hosts);
but the problem is : i cannot get the site again and add to it the host header
![]() |
Similar Threads
- Configuration Error (ASP.NET)
- Another version of ".aspx won't run on IIS" (ASP.NET)
- iis on 2003 (Windows Servers and IIS)
- how to test subdomain (ASP.NET)
- add host header on iis programmatically (VB.NET)
- IIS and FrontPage 2002 Server Extensions (Windows Servers and IIS)
- Html header of a page changed programmatically? (ASP.NET)
Other Threads in the C# Forum
- Previous Thread: XML Reader Help
- Next Thread: Access unqualified XML element
| Thread Tools | Search this Thread |
.net access ado.net algorithm array barchart bitmap box broadcast buttons c# chat check checkbox client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file files form format forms function gdi+ httpwebrequest image index input install java label list listbox listener mandelbrot math mouseclick mysql networking object operator path photoshop picturebox pixelinversion post prime programming properties radians regex remote remoting richtextbox save saving serialization server sleep socket sql statistics stream string table tables tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml





