4
votes

I've developed .an application using Silverlight and WCF Ria Services.
The application must be host on windows XP machine that uses IIS 5.
Due the information i found on web I did deploy application without any problems.
But now when my application tries to execute first WCF query I've faced this error :

Message: Unhandled Error in Silverlight Application Load operation failed for query 'Login'. [HttpWebRequest_WebException_RemoteServer] Arguments: NotFound Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.1.10411.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error) at System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.End(IAsyncResult result) at System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.<>c_DisplayClass1.b_0(Object state) at System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.RunInSynchronizationContext(SendOrPostCallback callback, Object state) at System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.HandleAsyncCompleted(IAsyncResult asyncResult) at System.ServiceModel.DomainServices.Client.AsyncResultBase.Complete()
at System.ServiceModel.DomainServices.Client.ApplicationServices.WebAuthenticationService.HandleOperationComplete(OperationBase operation) at System.ServiceModel.DomainServices.Client.LoadOperation.<>c_DisplayClass41.<Create>b__0(LoadOperation1 arg) at System.ServiceModel.DomainServices.Client.LoadOperation`1.InvokeCompleteAction() at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error) at System.ServiceModel.DomainServices.Client.LoadOperation.Complete(Exception error) at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult) at System.ServiceModel.DomainServices.Client.DomainContext.<>c_DisplayClass1b.b__17(Object )

How can I fix this error ?
Application hosted successfully on IIS 7 on windows 7 machine and wcf ria did work too.
Update : After using Fiddler I found my application's error is 404 , Silverlight can't find Ria Services .

2

2 Answers

0
votes

NotFound means any error on the server in this case. You need to get detailed WCF logs. I'd recommend you to add the following to the web.config file to enable WCF logging:

<configuration>
  ... your regular configuration here ...
  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel" switchValue="All" propagateActivity="true">
        <listeners>
          <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener"
initializeData="C:\wcflogs\your_wcf_service_log.svclog"  />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>
</configuration>

Then you can open .svclog file with Service Trace Viewer Tool (SvcTraceViewer.exe) and see what happened in detail.

0
votes

Try to re install RIA Services on server.

I think the command was RiaService.msi Server=true

after reinstalling, try to access your service directly on web browser. the URL of your Service will be http://YOURDOMAIN.COM/YourAPP/Full-NameSpace-Of-Class.svc

in the namespace, you will have to change dots (.) by dashes(-)

if it doesn't return response, then you have to verify that WCF is installed and registered with IIS.