visual studio 2008 - How-to: Moving WCF service from localhost to production server -
I have worked through a WCF web service on my development machine. I made the service, created a test client, tested everything and it works I was feeling very good about this WCF stuff. Then I got the courage and took it to my production server.
For now, the production server is at WinHost.com. My test domain is www.MyDomain.com, an application folder is created, / websvc, and the web service files are copied in the service address
Now that I have moved to the production server, So I can not use the web service I get this error - "This collection already has an address with the http http." I ran the message for the solution, tried something, but it only caused the other errors. So I reset everything and I'm starting.
Based on the above service address, My Web What does the configured look? In particular, what should my end-points look like in this?
Here's what I have now ...
& lt; Configuration & gt; & Lt; System.serviceModel & gt; & Lt; Services & gt; & Lt; Service name = "EvalServiceLibrary.EvalService" & gt; & Lt; Endpoint address = "http://www.mydomain.com:80/websvc/mex" binding = "maxhtpindex" contract = "imdatedexchange" /> & Lt; Endpoint address = "http://www.mydomain.com:80/websvc/basic" binding = "basic HttpBinding" contract = "EvalServiceLibrary.IEvalService" /> & Lt; / Services & gt; & Lt; / Services & gt; & Lt; Behavior & gt; & Lt; ServiceBehaviors & gt; & Lt; Behavior name = "service" & gt; & Lt ;! - To avoid disclosing metadata information, set the value below to false and delete the metadata endpoint before deployment - & gt; & Lt; ServiceMetadata httpGetEnabled = "true" /> & Lt ;! - To get exception details in the flaws for debugging purposes, set the price below to true. To avoid exposing exception information, set it to false before deployment - & gt; & Lt; The services included in the debugging include exceptions = DishialInstine = "false" /> & Lt; / Behavior & gt; & Lt; / ServiceBehaviors & gt; & Lt; / Behavior & gt; & Lt; /system.serviceModel> & Lt; / Configuration & gt;
Every time I run it on, that's because IIS has many virtual names Host (a common configuration in hosted scenarios) is a good way to fix this that always works for me - note that you have to define your endpoint address clearly and accurately, with the appropriate hostname It also includes (it looks more like you, more or less) is).
> I have worms around it and it is believed that it is better for 4.0 but I have not tried it yet.
Comments
Post a Comment