WCF RIA Services

Discussion in 'General troubleshooting' started by silverlightmonster, Dec 12, 2009.

  1. Hi,

    I have a silverlight application making use of WCF RIA services. However, unfortunately when I am uploading the files online, the application is generating a couple of errors. The application runs fine locally.

    After checking for errors, I found out that I need to set some setting on the server, namely WCF Activation (for handling .svc). I am not sure whether I have control over these features.

    I have checked the error using Fiddler, and it seems im getting a 500 Error, ie a server error. Can you please tell me what should i do? I urgently need to launch the application by today :s

    You may check the link here: [sorry, no tinyurl links - please post the actual URL]

    Thanks
     
  2. Ray

    Ray

    What do you mean by "namely WCF Activation (for handling .svc)"? Are you trying to set .svc to be called by the ASPNet engine?
     
  3. yep something like that. For some funny reason it seems its not finding the .svc file or something on the server side is crashing the whole application :s
     
  4. Ray

    Ray

    Check what application pipe line mode you are running on. If you are on Integrated mode then all calls should be running to ASPNet. If you are on classic mode you can still specify mapping the extension by using IIS 7 Manager to connect to the server.
     
  5. im using integrated mode at the moment. Can you tell me what can be done to solve the issues im getting?
     
  6. This issue you may resolve, but first check that your service is fully working by opening http://yoursite.com/YourService.svc .
    If your service is working then you must change end point of your service from development environment to production environment by changing the reference of your Service in ServiceReferences.ClientConfig file (Silverlight app).
    You can do this also by opening compiled Silverlight .xap file (WinRar, Total Commander) and change:
    Code:
    <endpoint address="http://localhost/UliceService.svc" 
    to
    Code:
    <endpoint address="http://yourwebsite.com/YourService.svc" 
    And be sure to check this also:
    http://forum.Winhost.com/showpost.php?p=48&postcount=5
     
    Last edited by a moderator: Oct 14, 2015
  7. Hi Nikola,

    Thanks for your reply. On checking what you suggested, I got the following error:

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
    Parameter name: item

    Am not sure what this actually means :(

    Can anyone help me out?
     
  8. You can have only one prefix with http:
    Code:
    <add prefix="http://www.mysite.com"/>
    you can't have this:
    Code:
    <add prefix="http://www.mysite.com"/>
    <add prefix="http://mysite.com"/>
     
  9. Due to this restriction I found solution that's working for me. I configure it to be with www prefix and then I redirect non www addresses with Url Rewrite module:
    1. Web.config:
    Code:
    <system.serviceModel>
            <serviceHostingEnvironment >
                <baseAddressPrefixFilters>
                    <add prefix="http://www.mywebsite.org" />
                </baseAddressPrefixFilters>
    2. ServiceReferences.ClientConfig:
    Code:
    <client>
                <endpoint address="http://www.mywebsite.org/Service.svc"
    3. Url redirect

    cheers
     
  10. Thanks for the info!
     

Share This Page