none
HttpWebRequest_WebException_RemoteServer message when using non-development Silverlight client

    Question

  • I have a Silverlight app which makes WCF calls to the same website on which it is located.  The app has been tested both locally and as installed on the web site and the WCFcalls work fine, returning data as expected. Except when tested from a browser on a machine that does not have any Silverlight development tools on it.  When tried out that way, I receive the following e.Error.Message upon return from the WCF call:
    [HttpWebRequest_WebException_RemoteServer]
    Arguments: NotFound
    Debugging resource strings are unavailable...

     

    I have double checked this now by testing side by side using a development machine and an end-user machine and confirmed it.  There is definitely a difference in behavior/results between the development version of the Silverlight client and the standard version of the Silverlight client - version 3.0.40818.0 in all cases.

    Maybe there are known and expected differences and I am just not aware of the documentation for it?

    Any help is greatly appreciated.

     

    Tuesday, October 06, 2009 8:37 PM

Answers

All replies

  • I think you would be able to get an idea of what is going on with a tool like fiddler, web developer helper, or firebug.

     

    http://blogs.silverlight.net/blogs/msnow/archive/2008/10/20/silverlight-tip-of-the-day-63-how-to-monitor-http-traffic-for-errors.aspx

    Wednesday, October 07, 2009 5:36 AM
  • I've checked the traffic using FireBug.  For the development machine, it shows a Post to the ServiceName.svc with a server response of 200 Ok and data returned.  For the machine using the Silverlight standard runtime, it shows the exact same Post to the ServiceName.svc but with a server response of 404 Not Found and no data returned.

    My only guess at this point is that the problem may be a result of my using the newly supported binary binding for the WCF services.  Perhaps that was meant to be supported only for non-production use?  I don't know.  I guess I will try reverting to basicHttpBinding unless someone else has better information to offer. 

    Again, all help is greatly appreciated.  Thank you Ken for reminding about checking the traffic.

     

    Wednesday, October 07, 2009 1:36 PM
  • Well it turns out that there are probably no differences between the developer and standard Silverlight runtimes as far as my issue goes.  I did try switching the binding and it made no difference.  Then I discovered the real problem had to do with whether the application was accessed using "www.domain.com" or just "domain.com."  I hadn't noticed at first that the two different machines were using two different host addresses.  It turns out that my WCF services are only found when using the "www.domain.com" form of the host address.  This leads me to a different issue, of course, but this one, per se, is done.  Ken, I'm marking your response as the answer since that is what helped me get to the real issue (once I used a clearer pair of eyes.)

    Thursday, October 08, 2009 11:43 PM
  • can you specify, how did you solve the problem, so it works for both versions.. One with www.site.com and site.com ??

    with regards

    Franc

    Wednesday, January 13, 2010 7:38 AM
  • Have the same problem over here and I've been working 4.5 hours non stop and I can'T stop until I find what's going on.

    Windows Server 2008
    Silverlight 4 app installed,
    AppPool is targetting 4 Integrated
    Application starts and stops at the first WCF call with the same error above

    I triple checked and more then that, the service is responding from the browser.  I've installed the .NET Framework 3.0 WCF http activation feature from Windows Features on or off section as there's no .NET Framrwork 4 WCF http activation features to install anyway and I don't even know why but who knows ?

    So right now I'm in the blank

    TOTALLY

     

    Tuesday, June 08, 2010 11:12 AM
  • Ok you will not believe this.  After 5 hours of non stop working on the error, it turned out it was just because in the web.config, I had written Key instead of key for a setting

     

    YES sir, all a message just to know that it was that.  EVENT VIEWER IS YOUR FRIEND

    Tuesday, June 08, 2010 11:58 AM
  • Another trick I found is to try the application directly from IIS,  the message will be even clearer.

     

    Tuesday, June 08, 2010 6:47 PM
  • Of course this works when on developpement machine in Visual Studio but when it occurs on the customer machine in production, this somewhat hard to know what's going on even after fixing the Key thing.  Why WCF or Silverlight is always reporting NOT FOUND instead of giving something more detailed about what's going on ?

    This is something very difficult to find the cause of a NOT FOUND error with the 

    [HttpWebRequest_WebException_RemoteServer]

    Arguments : NotFound 

    [HttpWebRequest_WebException_RemoteServer]

    Arguments : NotFound

    We need support for that AFAP.

     

    Thursday, August 05, 2010 10:26 AM
  • I would give all I have in this world to have a step by step guideline on how to pin point where exactly is the problem.

    I'm only used to debug in VS2010 and when a project is deployed I have no knowledge of how to debug this error on the production machine which occurs only once or two per day and I can't stay on any given computer at their office because it's too far away to be phisicly be there so I can just go in RDP to their server.

    I know nothing about fiddler but how I can't tell the users to use it as I can't stay there and I don't know if this will could help us.  Of course these users are very very poor in computer science.

    The scenario is as follow :

    A company with 30 computers running the Silverlight 4 application targeting pure WCF service on the server and making a lot of transactions per day without problems except once or two per day, the error

    [HttpWebRequest_WebException_RemoteServer]
    Arguments : Not Found

    occurs and it actually seems to occur on one machine.  Not a very pleasant way to pin point where is the problem.
    I don't even know where this error comes from.  Is this a WCF message ? a Silverlight message ? A ASP.NET Message ? Another thing message ?

    I would apreciated so much to have help on this...

    Silverlight 4
    Pure WCF
    IIS 7
    .NET Framework 4.0

     NOTE : On the WCF side code, I have try catch and I return any error to the client.  This is where I catch this error
                

    Here's the complete error returned by the try catch on the server side :

    Application : APP 
    GESTION
    
    [Async_ExceptionOccurred]
    Arguments : 
    Les chaînes de ressource de débogage ne sont pas disponibles. Souvent la clé et les arguments fournissent suffisamment d'informations pour diagnostiquer le problème. Consultez http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50524.0&File=System.dll&Key=Async_ExceptionOccurred
    
       à System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
       à APP.ProxyCode.ApproveProductionCompletedEventArgs.get_Result()
       à APP.MainPage._Proxy_ApproveProductionCompleted(Object sender, ApproveProductionCompletedEventArgs e)
       à APP.ProxyCode.APPServiceClient.OnApproveProductionCompleted(Object state)
    
    [HttpWebRequest_WebException_RemoteServer]
    Arguments : NotFound
    Les chaînes de ressource de débogage ne sont pas disponibles. Souvent la clé et les arguments fournissent suffisamment d'informations pour diagnostiquer le problème. Consultez http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50524.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer
    
    Maureen : I was waiting for the approbation to finish
    


     

    Thursday, August 12, 2010 5:53 AM
  • I tried with all of these and nothing seems to tell me where is the problem.  Any other ideas ?

     

    Friday, October 22, 2010 8:50 AM
  • Is there really no one having a way to know how I can pin point what is causing a message like

    HttpWebRequest_WebException_RemoteServer

    Friday, October 29, 2010 8:41 AM
  • The day someone will really tell me how to pin point this problem, it'll be the day of my life really !
    I can't use fiddler and all I have is a Silverlight client communicating with WCF service at it's simpliest form and getting this once per 2 weeks is hard to figure out so I need a way to make my code aware of what is behind this.

     

    Wednesday, December 15, 2010 9:29 AM
  • Setup your server for Silverlight 4 and WCF RIA Services:
    1) Download and install the .NET 4 Framework Web Platform Installer.
       Use the installer to install the .NET 4 Framework.  Reboot the server after this completes.
    2) Download WCF RIA Services to your local machine (e.g. c:\temp).
       Open up a command window (I used "Run as Administrator"). Go to the folder with the MSI file (e.g. c:\temp) and type the following command to launch the install of WCF RIA Services: msiexec /i RiaServices.msi SERVER=TRUE
    3) To remove anoying error [HttpWebRequest_WebException_RemoteServer] do the following: 
       go to the command prompt, open the Microsoft.NET\Framework64 folder (e.g. C:\Windows\Microsoft.NET\Framework64\v4.0.30319) and execute the following commands:
       servicemodelreg -ia
       aspnet_regiis -i
       iisreset
    This corrects the installation issue and WCF RIA Services works as expected.
    Regards,
    Matjaz Bravc, MCPD

    Hello to all! Deploying Silverlight 4 applications with WCF RIA Services can be really a nightmare! But here is solution!

    Setup your server (e.g. MS Windows Server 2008 R2, IIS7) for Silverlight 4 and WCF RIA Services:

    1) Download and install the .NET 4 Framework Web Platform Installer.
        Use the installer to install the .NET 4 Framework.  Reboot the server after this completes.

    2) Download WCF RIA Services to your local machine (e.g. c:\temp).
        Open up a command window (I used "Run as Administrator"). Go to the folder with the MSI file (e.g. c:\temp) and
        type the following command to launch the install of WCF RIA Services:
        
        msiexec /i RiaServices.msi SERVER=TRUE


    3) To remove anoying error [HttpWebRequest_WebException_RemoteServer] do the following:
        go to the command prompt, open the Microsoft.NET\Framework64 folder
        (e.g. C:\Windows\Microsoft.NET\Framework64\v4.0.30319) and execute the following commands:

        servicemodelreg -ia
        aspnet_regiis -i
        iisreset

    This corrects the installation issue and WCF RIA Services works as expected.

    Regards,

    Matjaz Bravc, MCPD

    Thursday, February 03, 2011 2:35 AM
  • And what do you do when it's not WCF RIA Services ?
    Yet, this error occurs some times not all the times and this makes the whole work a very difficult one to pin point.

     

    Thursday, February 03, 2011 3:45 PM
  • Dude, I feel your pain. I was getting the same error, but only in a child window's button on click event calling a stored procedure. Everything else for Silverlight was working fine. I stumbled into a fix, I was going to test the app from the prod IIS server, usually produces a more accurate error and a good place to start for Asp.Net apps. I obviously had to install the Silverlight client to test. It fixed the issue. Some how IIS must be using the Silverlight client (runtime) as a framework, even though I don't see it documented any where. My set-up a little differenct than yours though:

    2003 Server

    IIS 6

    .Net 3.5 SP1 framework


    Good luck!

    Monday, March 07, 2011 11:43 AM
  • After a lot of research, using Fiddlers and analysing WCF traces, I finally end up with the fact that I was trying to get too much data from WCF at once which a simple tag like 

     <dataContractSerializer maxItemsInObjectGraph="2147483647"/>

     in the web.config solve the problem a BIG thanx to sladapter

    Monday, March 07, 2011 7:25 PM
  • Had the same problem when I deployed my website to a shared hosting provider.

    Fiddler enabled me to find my bug. So thanks for that lead, which allowed me to read a server error coming back on a request to the .xap file.

    It turned out that in my case it didn't like the fact that I had multiple authentication schemes enabled on the server. When I turned off Windows Authentication, the calls to my SQL Linq objects worked perfectly.

    Wednesday, April 06, 2011 7:36 PM
  • In all cases, I think it's somehow aweful to have to rely on a tool like Fiddler to know what's going on.  Is it too much having a respectful message coming from WCF or Silverlight ?  I understand that it's out of the scope of them but the poor developer at the end is strugling to understand what the enigmatic message The server returned an error NOT FOUND or HTTPWEBREQUEST_WEBEXCEPTION_REMOTESERVER means.  Sure there's way to overcome but when people are able to make Silverlight application using WCF they do not obigatory know every little things you have to do to avoid such catastrophy.

    Hope Silverlight 5 will adress this.

    Saturday, April 09, 2011 6:41 AM
  • We are getting this error on our system. We are not using WCF but using WebClient (multiple).

    We log all errors on the client back to the server. It is only happening for 4 or 5 users (out of thousands).

    The request is being processed correctly by our HttpHandler and the IIS logs show a 200 result (and the correct result) being sent back. But these 4 or 5 are constantly sending these NotFound errors. The same HttpHandler processes the 'alledged' failing calls that processes the errors and the errors are being received about 3 tenths of a second after the original result is sent.

    Its always the same call(s) for the specific user(s).

    All the results are sent back with all the no-cache options in the world (they were not for the 1st 10 mins of go-live - oops) - so I cant see how it could be a cache problem (which I originally thought it was) and as the requests are actually hitting the server and being processed it can't be caching anyway...

    Been struggling with this now for weeks.

    We are unable to reproduce the problem. We've tried everything we can think of to track it down.

    Only thing left for us is to use only one WebClient - this could cause us a problem as all the calls have a latency tollerance (it's a MMO game) built in - and having to wait for one call to complete before starting the next could cause problems.

    Any suggestions - or does anyone know if there are any issues when using multiple WebClient objects.

    BTW - it's a SL3 code base but the failing clients are on varying versions of SL4.

    Monday, August 22, 2011 6:48 PM
  • Hi GearWorld,

    I am facing the very similar issue with you (random HttpWebRequest_WebException_RemoteServer).

    I checked my web.config and I have the following setting too:

     <behavior name="largeQuotaBehavior">
     <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
     </behavior>

    Could you please tell me what the exact setting you put to this setting? How could you calcualte the max items if you cannot set a big number here?

    Thanks a lot!

    After a lot of research, using Fiddlers and analysing WCF traces, I finally end up with the fact that I was trying to get too much data from WCF at once which a simple tag like 

     <dataContractSerializer maxItemsInObjectGraph="2147483647"/>

     in the web.config solve the problem a BIG thanx to sladapter

    Friday, October 07, 2011 11:20 AM
  • Hi Cantor.Li

    I am facing a similar issue too.Were you able to resolve this issue?Could you please tell me what the exact setting you put to this setting?

    Thanks

    Satya

    Tuesday, January 03, 2012 8:33 AM