Problem in deployment of wcf service using localhost in service url
I have created and deployed the wcf service on server as a windows service, with url in app.config as "http://localhost:portnumber/...." I am accessing this wcf service from browser of client machine(Client machine is different from server) by using url "http://servername:portnumber/......" 开发者_如何学编程but I am not able to access it because it seems my client request redirected to localhost and not to server. Can anyone help me regarding this?
My another question related to this is do I have to deploy service using servername in the url or localhost is all right, what is the best way?
Change the URL in the config file to point to the actual server. That's all you need to do.
localhost is their local machine, or when you're developing your local machine, which is why it works in development.
精彩评论