how to bind WCF service to IP address

前端 未结 2 1705
情歌与酒
情歌与酒 2021-01-07 07:43

I am developing a WCF service hosted by IIS, using VSTS2008 + C# + .Net 3.5. I find when reference the service from a client by using Add Service Reference..., client has to

2条回答
  •  独厮守ぢ
    2021-01-07 08:21

    I was having this same issue and seen your post while looking for answers to my own problem.

    I think I may have found a solution, which was to change the IIS site binding to be that of the ip. I still don't understand why this can't be a setting in the .config file.

    Here is the link to the solution that I found (http://blogs.msdn.com/wenlong/archive/2007/08/02/how-to-change-hostname-in-wsdl-of-an-iis-hosted-service.aspx).

    Here is a link to my post on my issue (.NET WCF service references use server name rather than IP address causing issues when consuming).

    Here is a link to my post about finding the solution (WCF (hosting service in IIS) - machine name automattically being picked up by WCF rather than IP?).

提交回复
热议问题