3
votes

A SL app created with SL Business Application template. Then Config it use Windows Authentication in web.Config as:

<authentication mode="Windows">     
</authentication>

Code in App.xaml.cs to initialize authentication as:

 webContext.Authentication = new WindowsAuthentication() 
     { DomainContext = new MyRIAServices.Web.AuthenticationContext() };

then move this app to IIS and set website under IIS as Widnows Authentication. Then Run this app, it is fine, It can get domain account (AD acount logged into windows).

Then move this app to anohter computer Windows 2008 R2 in the same domain. website under IIS configed exactly same as on windows 7. then access the sl app and got following error:

Load operation failed for query 'GetUser'.
[HttpWebRequest_WebException_RemoteServer]
Argument: 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=4.0.50917&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 ) Caused by: Load operation failed for query 'GetUser'. [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=4.0.50917.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 ) Caused by: Load operation failed for query 'GetUser'. [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=4.0.50917.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 ) Caused by: Load operation failed for query 'GetUser'. [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=4.0.50917.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 to fix this problem?

1

1 Answers

2
votes

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