I've got a silverlight enabled wcf service, but when I moved it over to Winhost and tried to navigate to it to see if it was working I got an error. From other forums I was able to get past a couple errors, but now I'm stuck on this one. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. All I'm doing is navigating to the URL of the service and when I run the app in debug on my local machine it works fun, so it shouldn't have anything to do with any functions. Does anyone have any ideas?
The error you are getting is really not descriptive. Try downloading and installing Fiddler. http://www.fiddler2.com/fiddler2/version.asp It records all http calls to your application. That should help you better troubleshoot your application.
But I'm not having this issue on my local machine. It only happens when I try to do it on Winhost. How would I set Fiddler up to work there?
You don't setup fiddler on our server you set it on your computer. Then go through your web page hosted on our server while running fiddler and it will record the http calls your browser makes to our server and it will give you more details on the error. Did you read the link I gave you about fiddler to learn more about it? http://www.fiddler2.com/fiddler2/
Oh, duh. I hadn't needed Fiddler in over a year, so I forgot how it worked. I've been tinkering with it to try to get it working, and now I'm getting a different error. Here's what Fiddler says: GET http://sewposhc.w01.Winhost.com/SPService.svc HTTP/1.1 Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */* Referer: http://sewposhc.w01.Winhost.com/SPService.svc Accept-Language: en-US User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; FunWebProducts; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0) Cookie: __utma=119716366.1908115882.1291353020.1291353020.1291437282.2; __utmz=119716366.1291353020.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none) Accept-Encoding: gzip, deflate Proxy-Authorization: Basic bWF0dGhldy5zd2FpbkBtdnRyYW5zaXQuY29tOnRoYXQxZ3V5 Proxy-Connection: Keep-Alive Pragma: no-cache Host: sewposhc.w01.Winhost.com
Did you check on the web service your application is calling? http://sewposhc.w01.Winhost.com/SPService.svc If pulled it up directly this is the error it is showing. Config Error The configuration section 'baseAddressPrefixFilters' cannot be read because it is missing a section declaration Try looking at this kb article. http://support.Winhost.com/KB/a804/error-when-accessing-wcf-service-this-collection-already.aspx
Thank you very much. I've got that issue sorted out now. If I put in the URL of the service it all looks good now. Unfortunately for some reason I'm still not able to connect my silverlight app to the service. I've set up my app to take an init parameter from the page it's hosted in. If I pass it one value then it uses my local service (only accessible from this machine), and if I pass it another then it uses the one I'm hosting on Winhost. When I try to get it to use the one on Winhost though it always fails. Here's the error I get in Fiddler for those service calls: I have no idea how to fix that.
Do you have a URL we can look at and see your error message. Sorry but your explaination on how your web application works is a little confusing.
I've researched the error, and it says I need to include: Code: <textMessageEncoding messageVersion="None" writeEncoding="utf-8" /> in my binding in the ServiceReferences.ClientConfig file. Unfortunately that tag is only valid as a child of a custombinding, not a basichttpbinding like I'm using. I guess I can try to change to using a custombinding, but I'm not as familiar with them.
I've used each of these bindings: <binding name="MyCustomBinding"> <binaryMessageEncoding /> <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"> <extendedProtectionPolicy policyEnforcement="Never" /> </httpTransport> </binding> <binding name="MyBasicHttpBinding" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <security mode="None"> <transport> <extendedProtectionPolicy policyEnforcement="Never" /> </transport> </security> </binding> <binding name="MyOtherCustomBinding"> <textMessageEncoding writeEncoding="utf-8" /> <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"> <extendedProtectionPolicy policyEnforcement="Never" /> </httpTransport> </binding> But I can only get the first one to work.
I pulling up your link http://sewposhc.w01.Winhost.com/SewPosh.aspx and fiddler is showing me a lot of 404 error messages. Are you sure you uploaded all the necessary files, components, and assemblies on our web server?
You may want to double check again. Also bear in mind that although it maybe working on your local computer it does not necessarily mean that our server will have what ever assembly or component in the servers GAC. Often the case a user takes for granted that what ever they have on their own computer will be on the server also. This is hardly the case. Check your local computer and verify what components or assemblies your application is using and also make sure it is uploaded to your applications Bin folder on the web server.
Thank you so much for your help. I finally got it running. It was a service configuration error like I thought, but you pointed me in the right direction.