Argument: NotFound Error Using Windows Authentication for Silverlight

SL application created using the SL business application template. Then configure it using 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 application to IIS and configure the website under IIS as Widnows Authentication. Then run this application, this is normal, it can get a domain account (the AD account is registered in the windows).

Then move this application to another Windows 2008 R2 computer in the same domain. The website in IIS is configured exactly the same as on Windows 7. then open the sl application and get the 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

System.ServiceModel.DomainServices.Client.OperationBase.Complete( )     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.End( IAsyncResult)     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation. < > c_DisplayClass1.b_0 ( )     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.RunInSynchronizationContext(SendOrPostCallback callback, )     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.HandleAsyncCompleted(IAsyncResult asyncResult)     System.ServiceModel.DomainServices.Client.AsyncResultBase.Complete()     System.ServiceModel.DomainServices.Client.ApplicationServices.WebAuthenticationService.HandleOperationComplete( OperationBase)     System.ServiceModel.DomainServices.Client.LoadOperation. < > c_DisplayClass4 1.<Create>b__0(LoadOperation 1 arg)     System.ServiceModel.DomainServices.Client.LoadOperation`1.InvokeCompleteAction()     System.ServiceModel.DomainServices.Client.OperationBase.Complete( )     System.ServiceModel.DomainServices.Client.LoadOperation.Complete( )     System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)     System.ServiceModel.DomainServices.Client.DomainContext. < > c_DisplayClass1b.b__17 (Object) : "GetUser" . [HttpWebRequest_WebException_RemoteServer] : NotFound . . . http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50917.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer

System.ServiceModel.DomainServices.Client.OperationBase.Complete( )     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.End( IAsyncResult)     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation. < > c_DisplayClass1.b_0 ( )     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.RunInSynchronizationContext(SendOrPostCallback callback, )     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.HandleAsyncCompleted(IAsyncResult asyncResult)     System.ServiceModel.DomainServices.Client.AsyncResultBase.Complete()     System.ServiceModel.DomainServices.Client.ApplicationServices.WebAuthenticationService.HandleOperationComplete( OperationBase)     System.ServiceModel.DomainServices.Client.LoadOperation. < > c_DisplayClass4 1.<Create>b__0(LoadOperation 1 arg)     System.ServiceModel.DomainServices.Client.LoadOperation`1.InvokeCompleteAction()     System.ServiceModel.DomainServices.Client.OperationBase.Complete( )     System.ServiceModel.DomainServices.Client.LoadOperation.Complete( )     System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)     System.ServiceModel.DomainServices.Client.DomainContext. < > c_DisplayClass1b.b__17 (Object) : "GetUser" . [HttpWebRequest_WebException_RemoteServer] : NotFound . . . http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50917.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer

System.ServiceModel.DomainServices.Client.OperationBase.Complete( )     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.End( IAsyncResult)     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation. < > c_DisplayClass1.b_0 ( )     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.RunInSynchronizationContext(SendOrPostCallback callback, )     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.HandleAsyncCompleted(IAsyncResult asyncResult)     System.ServiceModel.DomainServices.Client.AsyncResultBase.Complete()     System.ServiceModel.DomainServices.Client.ApplicationServices.WebAuthenticationService.HandleOperationComplete( OperationBase)     System.ServiceModel.DomainServices.Client.LoadOperation. < > c_DisplayClass4 1.<Create>b__0(LoadOperation 1 arg)     System.ServiceModel.DomainServices.Client.LoadOperation`1.InvokeCompleteAction()     System.ServiceModel.DomainServices.Client.OperationBase.Complete( )     System.ServiceModel.DomainServices.Client.LoadOperation.Complete( )     System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)     System.ServiceModel.DomainServices.Client.DomainContext. < > c_DisplayClass1b.b__17 (Object) : "GetUser" . [HttpWebRequest_WebException_RemoteServer] : NotFound . . . http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50917.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer

System.ServiceModel.DomainServices.Client.OperationBase.Complete( )     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.End( IAsyncResult)     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation. < > c_DisplayClass1.b_0 ( )     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.RunInSynchronizationContext(SendOrPostCallback callback, )     System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.HandleAsyncCompleted(IAsyncResult asyncResult)     System.ServiceModel.DomainServices.Client.AsyncResultBase.Complete()     System.ServiceModel.DomainServices.Client.ApplicationServices.WebAuthenticationService.HandleOperationComplete( OperationBase)     System.ServiceModel.DomainServices.Client.LoadOperation. < > c_DisplayClass4 1.<Create>b__0(LoadOperation 1 arg)     System.ServiceModel.DomainServices.Client.LoadOperation`1.InvokeCompleteAction()     System.ServiceModel.DomainServices.Client.OperationBase.Complete( )     System.ServiceModel.DomainServices.Client.LoadOperation.Complete( )     System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)     System.ServiceModel.DomainServices.Client.DomainContext. < > c_DisplayClass1b.b__17 (Object)

?

+3
1

Silverlight 4 WCF RIA ! !

(, MS Windows Server 2008 R2, IIS7) Silverlight 4 WCF RIA:

1) .NET Framework Framework Installer.    .NET 4 Framework. .

2) WCF RIA (, c:\temp).    ( " " ). MSI (, c:\temp)    WCF RIA:

msiexec /i RiaServices.msi SERVER=TRUE

3) [HttpWebRequest_WebException_RemoteServer], :    , Microsoft.NET\Framework64   (, C:\Windows\Microsoft.NET\Framework64\v4.0.30319) :

servicemodelreg -ia
aspnet_regiis -i
iisreset

, WCF RIA , .

,

, MCPD

+2

Source: https://habr.com/ru/post/1773642/


All Articles