Friday, October 24, 2008

How to change localhost name WCF

Goto Default Web Site in Internet Information Services and right click to open the Properties Tab . Click on Advanced and change the Host Header name . Save and Close. Open ur soultion project and add the existing web site pointing to the WCF service . The service will be added as
http://newhostheadername/foldername/servicename.svc

To run this service , you have to goto c:\winnt\system32\drivers\etc\host file and edit the host name for 127.0.0.1 change localhost to the newhostheadername . save build the web site

Finally add a cherry to the pie do an IISRESET !!!!!

You will be able to browse the WCF service as

http://newhostheadername/foldername/servicename.svc
http://msmvps.com/blogs/bernard/archive/2004/07/29/10855.aspx


References : http://www.developersdex.com/asp/message.asp?p=4100&r=6155011

No comments: