Answered by:
Hosting my WCF/Silverlight App at a WebHoster

Question
-
I have a website that hosts my WCF service. The website also has some silverlight pages that call the WCF service. Everything works fine on my dev system and on other dedicated servers. However...
When I deploy to my webhoster shared server it does not work. If you enter http://www.deanblakely.com/DBAService.svc into a browser it resolves to http://pennsylvania.ad.safesecureweb.com/DBAService.svc?wsdl which is the host server because I specify "localhost" everywhere in my solution.
Looking at the deployed website web.config I see that it says...
<service behaviorConfiguration="ServiceBehavior" name="DBAWCFService.DBAService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="myBindingForBigArrays"
contract="DBAWCFService.IDBAService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
I tried changing the localhost to www.deanblakely.com but that had no effect.
What needs to be done to run on a shared server?
Thanks,
Gary
.net DeveloperThursday, August 6, 2009 5:58 AM
Answers
-
Hi Dean,
It seems what you like to do is changing the hostname of your WCF service's WSDL document to your publish host server's DNS name. Wenlong has posted a blog entry explaining this:
#How to change HostName in WSDL for an IIS-hosted service?
http://blogs.msdn.com/wenlong/archive/2007/08/02/how-to-change-hostname-in-wsdl-of-an-iis-hosted-service.aspx
I think you will need to contact the publish host as it will require you to do some configuration of the IIS server's binding.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Proposed as answer by Steven Cheng - MSFT Tuesday, August 11, 2009 5:09 AM
- Marked as answer by Steven Cheng - MSFT Wednesday, August 12, 2009 3:55 AM
Monday, August 10, 2009 11:48 AM
All replies
-
Hi,
Try to delete the whole <identity> ... </identity> element from your config.
--larsw
Lars Wilhelmsen | Senior Consultant | Miles, Norway | Connected Systems MVP | http://larswilhelmsen.com/Thursday, August 6, 2009 6:19 AM -
Lars,
No, that didn't do any good. It still resolves to the root of the server.
Thanks for trying to help.
Gary
.net DeveloperThursday, August 6, 2009 2:33 PM -
Hi Dean,
It seems what you like to do is changing the hostname of your WCF service's WSDL document to your publish host server's DNS name. Wenlong has posted a blog entry explaining this:
#How to change HostName in WSDL for an IIS-hosted service?
http://blogs.msdn.com/wenlong/archive/2007/08/02/how-to-change-hostname-in-wsdl-of-an-iis-hosted-service.aspx
I think you will need to contact the publish host as it will require you to do some configuration of the IIS server's binding.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Proposed as answer by Steven Cheng - MSFT Tuesday, August 11, 2009 5:09 AM
- Marked as answer by Steven Cheng - MSFT Wednesday, August 12, 2009 3:55 AM
Monday, August 10, 2009 11:48 AM