954,525 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

host header on iis programmatically

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

mona
Newbie Poster
8 posts since Jul 2005
Reputation Points: 10
Solved Threads: 0
 

hi dear,
did you get any solution for this. I also want to implement this

dr_maq
Newbie Poster
1 post since Oct 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You