Reputation: 920
I've written a silverlight app with a simple wcf service. Runs great on my computer, when I publish it to my web account it no longer works with the service. I tried editing the clintconfig file to set the endpoint to the new location, that did not fix it. So I downloaded this simple SilverLight App with WCF example setup for deploying, and it also works on my personal machine, but not when I publish it to my domain. My account supports asp.net, wcf, etc.. The link to the example I downloaded: http://www.codeproject.com/Articles/152778/Deploying-Silverlight-with-WCF-Services
I'm new to this, so I'm wondering if this is something that should work without additional work, or if I'm missing something. I'm not getting any errors, I'm just not getting the message displayed on the screen from the service.
Added following after Hatchets Comment: I'm trying to figure out how to find a error message. So far the only way I know it's not working is I don't see the message that is returned from the service. SilverLight displays the returned message, "Hello from My WCF Service". I see it on my machine, but not when I publish it to my domain. The app I downloaded, if I understand it right, is setup to work without having to change the endpoint address, but i'm so new to this, I've not figured out what i'm missing yet. Thanks.
Added after comments below:
I grabed fiddler, and after i added the tag, i was able to see an error in fiddler, and when browsing to the .svc file. Error:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized attribute 'multipleSiteBindingsEnabled'. Note that attribute names are case-sensitive.
Source Error:
Line 30: </bindings>
Line 31: <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
Line 32: multipleSiteBindingsEnabled="true" />
Line 33: <services>
Line 34: <service name="testWCF.Web.Service1">
Source File: \boswinfs03\home\users\web\b706\whl.forystpcom\web.config Line: 32
Version Information: Microsoft .NET Framework Version:2.0.50727.4211; ASP.NET Version:2.0.50727.4016
I'm unfamiliar with multipleSiteBindingsEnabled and the best way to handle this, does the version of .NET running affect this? The server i'm running this on supports up to 3.5 it says, but I notice it quotes version 2.0 in the error, not sure if they are connected.
Upvotes: 0
Views: 292
Reputation: 920
I'm not considering this the answer, just thought it was a cleaner place to put an update. My first problem was my program was using 4.0 and my provider did not support 4.0. My 2nd problem was: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.Parameter name: item" , I found a fix for this at: http://www.j2i.net/blogengine/post/2010/02/08/This-collection-already-contains-an-address-with-scheme-http-There-can-be-at-most-one-address-per-scheme-in-this-collectionParameter-name-item.aspx I was able to fix this by adding the following code.
<serviceHostingEnvironment aspNetCompatibilityEnabled="true">
<baseAddressPrefixFilters>
<add prefix="http://www.mydomain.com" />
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
Thanks to all the Help everyone. Thanks for carlosfigueira for the suggestion to download the fiddler app. If you want to repost that suggestion to a answer I'll check it, as it helped me figure out the errors I was getting, leading to solving the problem.
Upvotes: 0
Reputation: 844
MultipleSitesBindingEnabled is part of the 4.0 update, so it can not run on a server that supports up to 3.5. You need to configure your service to use a specific endpoint(s).
Sourse: MSDN
P.S. When browsing to the .svc, it will say that .net 2.0 is installed for anything from 2.0 - 3.5 , but then 4.0 is installed it will say 4.0.
Upvotes: 1
Reputation: 16257
I know the example you're following is not RIA Services, and this link is, but it may be helpful as it goes over some common Silverlight/WCF services deployment problems
http://blogs.msdn.com/b/saurabh/archive/2010/03/16/ria-services-application-deployment.aspx
Upvotes: 1