Answered by:
Load operation failed for query 'GetUser'. The remote server returned an error: NotFound

Question
-
We are getting the following error whenever we launch our silverlight 3 application in Windows Azure.
There are conversations in the WCF RIA Services forum about this error, but all solutions seem to be related to server\iis configuration.
Does anyone have an idea about how to solve this problem? thanks.
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 3.5.21022; .NET4.0C; .NET4.0E; Media Center PC 5.0; MS-RTC LM 8; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; SLCC1)
Timestamp: Wed, 10 Feb 2010 15:02:01 UTC
Message: Unhandled Error in Silverlight Application Load operation failed for query 'GetUser'. The remote server returned an error: NotFound. at System.Windows.Ria.OperationBase.InvokeCompleteAction()
at System.Windows.Ria.OperationBase.Complete(Exception error)
at System.Windows.Ria.LoadOperation.Complete(Exception error)
at System.Windows.Ria.DomainContext.CompleteLoad(IAsyncResult asyncResult)
at System.Windows.Ria.DomainContext.<>c__DisplayClass17.<Load>b__13(Object )
Line: 1
Char: 1
Code: 0
URI: http://0a4d880c07444ff595ae4c2a9e7fd8e3.cloudapp.net/Silverlight.js
- Moved by Brian AurichMicrosoft employee Wednesday, September 29, 2010 8:55 PM migration (From:Windows Azure - Archive)
Wednesday, February 10, 2010 3:58 PM
Answers
-
Hello, the NotFound error message you got from Silverlight's browser HTTP stack is mis-leading. Please add the following code in Application_Startup before creating the main page to switch to client HTTP stack, and you'll see the underlying error message. You can also use Fiddler to trace the requests.
HttpWebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp);
HttpWebRequest.RegisterPrefix("https://", WebRequestCreator.ClientHttp);
But be aware using cient HTTP stack may break authentication service unless you handle cookie manually. You can refer to http://blogs.msdn.com/b/kylemc/archive/2010/05/14/ria-services-authentication-out-of-browser.aspx for a workaround.In addition, for RIA Services, try to add a ServiceBehavior with IncludeExceptionDetailInFaults set to true on your domain service class. This allows the service to return detailed error information to the client.
[ServiceBehavior(IncludeExceptionDetailInFaults = true, AddressFilterMode = AddressFilterMode.Any)]
- Marked as answer by wallyh010 Thursday, February 11, 2010 6:12 PM
- Edited by Yi-Lun Luo Friday, November 12, 2010 1:40 AM
Thursday, February 11, 2010 3:11 AM
All replies
-
Hello, the NotFound error message you got from Silverlight's browser HTTP stack is mis-leading. Please add the following code in Application_Startup before creating the main page to switch to client HTTP stack, and you'll see the underlying error message. You can also use Fiddler to trace the requests.
HttpWebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp);
HttpWebRequest.RegisterPrefix("https://", WebRequestCreator.ClientHttp);
But be aware using cient HTTP stack may break authentication service unless you handle cookie manually. You can refer to http://blogs.msdn.com/b/kylemc/archive/2010/05/14/ria-services-authentication-out-of-browser.aspx for a workaround.In addition, for RIA Services, try to add a ServiceBehavior with IncludeExceptionDetailInFaults set to true on your domain service class. This allows the service to return detailed error information to the client.
[ServiceBehavior(IncludeExceptionDetailInFaults = true, AddressFilterMode = AddressFilterMode.Any)]
- Marked as answer by wallyh010 Thursday, February 11, 2010 6:12 PM
- Edited by Yi-Lun Luo Friday, November 12, 2010 1:40 AM
Thursday, February 11, 2010 3:11 AM -
Using fiddler we determined that the firewall filter was blocking content type marked as 'application/soap+msbin1'
Thanks for your help. Our app is now up and running.
<h3> Response denied by WatchGuard HTTP proxy. </h3> <b> Reason: </b> header 'Content-Type' denied rule='Default' value='application/soap+msbin1' <br>
Thursday, February 11, 2010 6:12 PM -
WCF RIA Services VS 2008 deployment errors
There are many nice postings on the net and the best one seems to be here (Thanks Tim)
http://timheuer.com/blog/archive/2009/12/10/tips-to-deploy-ria-services-troubleshoot.aspx
Although all the postings I found were useful in some way, the final solution in my case was the inappropriate DB connection string. Although the VS generated DB string worked fine within VS, I couldn’t deploy it to my QA server until I trimmed it to be like this.
----
add name="myEntities" connectionString="metadata=res://*/ReviewsModel.csdl|res://*/ReviewsModel.ssdl|res://*/ReviewsModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=dataSource;Initial Catalog=intitalCatalog;User ID=userID;Password=password;"" providerName="System.Data.EntityClient"
----
I hope this helps some of you.
Cheers,
Jesse B.
Friday, April 16, 2010 9:38 PM -
This method works well but the problem when I add
HttpWebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp);HttpWebRequest.RegisterPrefix("https://", WebRequestCreator.ClientHttp);
I couldn't use [RequiresAuthentication] In DomainDataService and I couldn't see authentication information.
is there anything wrong about what I did or is there any solution for itSaturday, September 11, 2010 11:25 PM -
Hi, I am facing the exact similar error. Prior to hosting the app I did the following:
Copied the DLLs to bin folder.
Added <trust level="Full" /> to Web.config
Set connectionString as follows: <connectionStrings><remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="Data Source=<SQLSERVER>;Integrated Security=false;Initial Catalog=<DB>;User ID=<USERID>;Password=<PASSWORD>" providerName="System.Data.SqlClient" /> </connectionStrings>
Authentication <authentication mode="Forms" />
ASP Setting <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
Now when I have hosted the application on a server I am geting this Load operation failed for query 'GetUser' error.
On fiddler i can see a HTTP/1.1 500 System.ServiceModel.ServiceActivationException generating at response headers.
I have configured IIS on my machine and hosted the application there. I see the same error. But in my local machine fiddler shows a 404 not Found error at response headers. It also tells me the error occured while trying to access the AuthenticationService.svc/binary file.
Let me give an overview of my application structure.
I am using an ASP.net membership provider to handle custom user validating logic against my Database. and I have not done anything on my autogenerated AuthenticationService service. in my VS environment, everything is working perfectly. What I am doing wrong?
Please help.Wednesday, September 29, 2010 12:46 PM -
Yet another suggestion, works for SL4 / SQLServer 2008R2, hosted at ISP: (so no influence whatsoever on IIS settings)
simply add this in the <system.webServer> section of web.config of the Sliverlight webapplication
<security>
<authentication>
<basicAuthentication enabled="false"/>
</authentication>
</security>
Good luck!
WayPoint7
"Every misfortune is a new challenge"- Proposed as answer by WayPoint7 Thursday, January 6, 2011 10:53 PM
Thursday, January 6, 2011 10:52 PM -
Esto resolvió mi problema con un hosting en WinHost.
Gracias, saludos,
AserewareWednesday, February 9, 2011 11:40 PM -
hi all,
The followings are the articles/summaries about the problems that you normally encounter when deploying WCF Silverlight based application to a server and the steps to fix it:
- http://webhosting.asphostcentral.com/post/2010/03/02/WCF-RIA-Service-Hosting-WCF-RIA-Service-Configuration-in-a-Shared-HostingServer.aspx
- http://webhosting.asphostcentral.com/post/2011/05/03/WCF-RIA-Service-Hosting-WCF-RIA-Service-adding-extra-Required-attribute-on-generated-classes.aspx
- http://webhosting.asphostcentral.com/post/2010/02/22/WCF-RIA-Service-Hosting-Error-Message-Load-Operation-Failed-for-query-GetUser.aspx
- http://webhosting.asphostcentral.com/post/2010/02/22/WCF-RIA-Service-Hosting-Error-Message-This-collection-already-contains-an-address-with-scheme-http.aspx
I certainly hope these articles will resolve all your issues. Thank you.Friday, May 20, 2011 4:40 AM -
Hello!
I want to try your solution but I've met following issue -
when I add reference to "System.Net.dll" version 5 it ends up with automatically adding "System.Net.dll" version 4 where it cannot find WebRequestCreator.
Is something wrong with my project settings?
Thanks.
Alexander Yaremchuk
Sunday, December 16, 2012 6:48 AM