Answered by:
load operation failed for query 'GetUser'. The remote server returned an 'not found'

Question
-
I build and publish a new "silverlight business application". The project works on localhost. But when I run the project on the server, I get:
load operation failed for query 'GetUser'. The remote server returned an error: NotFound.I am reading the articles online on this error, trying the fixes, and still get the error.
Can I put anything in my code to trap some error info? I tried to override the OnError method of the AuthenticationService class. Had no effect.
In the ConnectionStrings section of IIS I have a single entry for "LocalSqlServer". SQLEXPRESS. I have SQL Server on my server. I don't want SQLEXPRESS.
So far, MSDN support is stumped. I am wasting a lot of time. Any ideas?
Monday, February 1, 2010 2:26 PM
Answers
-
Hi,
You may check if windows authentication is enabled in your iis(if it is , diable it). I assume your site is using forms and anonymous.
Also if you want to use SqlServer, just change the connection string.
You can get a automatically generated connection string via create some data control and set datasource using design view.
After it's generated , copy and past it into the correct part of DataModel's string.
Best Regards
Wednesday, February 3, 2010 1:40 AM
All replies
-
http://forums.silverlight.net/forums/p/157947/355439.aspx#355439
http://timheuer.com/blog/archive/2009/12/10/tips-to-deploy-ria-services-troubleshoot.aspx
We haven't been able to deploy for a few months now. If you start with Tim Heuer's blog post and read the comments then you see how common this problem is.
If you can get yours to work maybe you could let me know if you did something different...Monday, February 1, 2010 2:45 PM -
Hi,
You may check if windows authentication is enabled in your iis(if it is , diable it). I assume your site is using forms and anonymous.
Also if you want to use SqlServer, just change the connection string.
You can get a automatically generated connection string via create some data control and set datasource using design view.
After it's generated , copy and past it into the correct part of DataModel's string.
Best Regards
Wednesday, February 3, 2010 1:40 AM -
that was the answer. Mark "windows authentication" as disabled in the application.
Thanks!
Thursday, February 4, 2010 9:22 AM -
Where specifically in your app did you disable it?
I have his exact problem.
Thanks!
Monday, February 15, 2010 6:23 PM -
Where specifically in your app did you disable it?
It is not in the app, it is in the security properties of the app in IIS.
- Proposed as answer by Chris K Wednesday, August 6, 2014 7:10 PM
Monday, February 15, 2010 8:59 PM -
I encounters the same error message "load operation failed for query 'GetUser'" when I deploy my Silverlight 3 WCF RIA application on a server (Windows Server 2003, IIS 6, SQL Server 2008).
Fiddler shows an HTTP 504 error: "ReadResponse() failed: The server did not return a response for this request" for the URL: http://MyServerIPaddress/ClientBin/MyApp-Web-AuthenticationService.svc/binary
I tried many configurations (following suggestions found in various articles, especially about security and authentication) without success.
I also configured Web.config for WCF error logging in accordance with http://betaforums.silverlight.net/forums/p/147491/328605.aspx but no log is output.
Tuesday, March 16, 2010 11:30 AM -
This sounds very similar to what I experienced. A circular reference in a data contract can result in this error.
http://johnleitch.blogspot.com/2010/03/remote-server-returned-error-notfound.htmlWednesday, March 31, 2010 6:50 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 5:34 PM
-
Root cause of our issue:
After trying all of the suggestions - most of them were needed... we were still getting the error... it turns out if we replace the pre-compiled aspx pages w/ the regular ones, it worked... Does anyone know if aspx pages are pre-compiled, do they pre-compile the web.config ?
Summary of what we did:
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}
Environment : VS2010 - 4/12 Silverlight 4 - 4/15
Issue: deploy silverlight 4 / ria service implementation to a single dev server (sql / iis ect all on same box)
Error reported by silverlight:
"Load Operation failed for query 'GetUser'. The remote server returned an error: NotFound."
Error in Fiddler:
· Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Cavatica/Services/Cavatica-Web-Services-LoginService.svc/binary/GetUserNote: Everything works locally of course...
My analysis : this seems to be one of those errors that can have several root cause's not using anonymous authentication in iis, bad sql connection strings, not having iis 6 mime types setup
Tried fixes:
set auth type to anonymous (removed check mark on integrated sec.), used my user id on box {dev environment, I am a member of admin, and can login via sql managment studio in integrated mode just fine.}
Verified / tweeked connection strings in web.config on server to point to the {Machinename}\InstanceName of the box, replacing the "." from the dev environment.
Left the authentication to integrated, as IIS now should be using my credentials.
Set the mime types in iis : (http://learn.iis.net/page.aspx/262/configuring-iis-for-silverlight-applications/)
· .xap application/x-silverlight-app
· .xaml application/xaml+xml
· .xbap application/x-ms-xbap
Silverlight 4 - so verified the following references on the silverlight app were set to copy local: (check path of referenced dll, if ria is in the path, I set copy local to true, did this for the web and the silverlight projects.)
Monday, April 19, 2010 11:25 AM -
Specifically remove PrecompiledApp.config from the virtual directory in IIS.
Monday, April 19, 2010 11:44 AM -
Normal 0 false false false MicrosoftInternetExplorer4 st1\:*{behavior:url(#ieooui) } /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}
I had the same issue.
From reading countless testimonials of the same issue on the net, it could be caused by several different things. To figure out what it is, sign on to the application server that you published to, open up a browser on it, and navigate to your site using localhost instead of the server name. All your REAL errors will show up and you can fix them.
I had several problems.
Because I installed my aspnetdb (asp authenication database) on a separate database, I had to include
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=MyServer;Initial Catalog=aspnetdb;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
in the web.config file. I just put it in the wrong web.config file and in the wrong section. It belongs in the IIS server website web.config, not the individual application web.config. Not only that, I had missed a quotation mark after LocalSqlServer and put the section above the "configSection" which are both bad. This is cool because this means you don't have to change the web.config file for your application every time you publish.
And don't forget the basic server configuration, that is, all the stuff that needs to be installed on the application server;
1) Install .net 4.0
2) Download and install RiaServices for Silverlight 4 and VS2010 on the server
msiexec /i RiaServices.msi SERVER=TRUE
3) Web Deploy Remote Service to make VS2010 publish work correctly
http://technet.microsoft.com/en-us/library/dd569087%28WS.10%29.aspx
4) Turn off windows authentication for Forms authenticated apps. I'm using IIS 6, I have a parent virtual directory where all my children application virtual directories are located, so I just had to turn it off on the parent and the children inherited the settings. Properties – Directory Security – “Authentication and Access Control” Edit button – enable anonymous access checked, user name = IUSR_MachineName, then make sure all the boxes in “authenticated access” are unchecked.
5) On the app server, make sure to run
C:\Windows\Microsoft.Net\Framework\V3.0\Windows Communication Foundation\ServiceModelReg.exe –i
C:\Windows\Microsoft.Net\Framework\V4.0.30319\ aspnet_regsql.exe (only if you are not using SQLExpress on app server for aspnet auth database)
C:\Windows\Microsoft.Net\Framework\V4.0.30319\aspnet_regsql.exe –E –S MyDatabaseServer –A all –d aspnetdb (only if you are not using SQLExpress on app server for aspnet auth database)
C:\Windows\Microsoft.Net\Framework\V4.0.30319\aspnet_regiis.exe (aspnet_regiis.exe -i)
5) Add the following MIME Types to the IIS server
.xap application/x-silverlight-app
.xaml application/xaml+xml
.xbap application/x-ms-xbap
Normal 0 false false false MicrosoftInternetExplorer4 st1\:*{behavior:url(#ieooui) } /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}Friday, May 7, 2010 9:24 AM -
actually i got the exactly the same error msg (load operation failed for query 'GetUser'. The server returned an 'not found') and i tried the methods that this post suggest to do, but the problem is still there.
i use winxp pro as server and the IIS version is 5.1.
I wonder if the IIS version is too low to cause this error or i have to use windows server not xp to deploy my db + silverlight4 ria app on...
thanks!
Thursday, August 5, 2010 4:31 AM -
It Works. Thanks.
You may check if windows authentication is enabled in your iis(if it is , diable it). I assume your site is using forms and anonymous.
Friday, September 10, 2010 6:11 PM -
I found the reply by frontier_teg to be the most helpful. I'm not sure, but I think it was installing RIA Services on the server that fixed my problem (even though I was originally installing the RIA System DLLs into my bin folder).
thanks
Tuesday, November 9, 2010 9:28 PM -
This solved my problem:
my IIS 6 Web Service Extension for ASP.NET v4.0~ was Prohibited. Setting status to 'Allowed' solved my problem
On IIS7 I didn't have to do this...
I've tried almost everything but nothing worked untilic setting the IIS6 Web Service extension like:
- Setting Anonymous access
- Setting MIME Mappings
- Installing MSI Services
- Copying domainservices DLL
- many times iisrestTuesday, February 22, 2011 4:56 PM -
Adding the following to my Web.config solved this issue
Also RIA services was installed on the server and IIS 6 support Anonymous access is enabled.
Hope this help.
<system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_SilverlightWCFService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <security mode="None" /> </binding> </basicHttpBinding> </bindings>
Monday, February 28, 2011 2:34 PM -
I have a simple solution
<connectionStrings>
<add
connectionString="Data Source=.;Initial Catalog=TestMembership;User;Password=sa@4321;Integrated Security=false;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<membership defaultProvider="MembershipProvider">
<providers>
<add connectionStringName="MembershipSqlServer"
type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>
<roleManager enabled="true" defaultProvider="RoleManagerProvider">
<providers>
<add connectionStringName="MembershipSqlServer"
type="System.Web.Security.SqlRoleProvider" />
</providers>
</roleManager>
<profile enabled ="false">
<properties>
<add/>
</properties>
</profile>
Tuesday, March 1, 2011 1:18 AM -
I have a solution membershipprovider name and Rolemanager provider name must be distint
see my config file
<connectionStrings>
<add
connectionString="Data Source=.;Initial Catalog=TestMembership;User;Password=sa@4321;Integrated Security=false;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<membership defaultProvider="MembershipProvider">
<providers>
<add connectionStringName="MembershipSqlServer"
type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>
<roleManager enabled="true" defaultProvider="RoleManagerProvider">
<providers>
<add connectionStringName="MembershipSqlServer"
type="System.Web.Security.SqlRoleProvider" />
</providers>
</roleManager>
<profile enabled ="false">
<properties>
<add/>
</properties>
</profile>
Tuesday, March 1, 2011 1:30 AM -
I am having the same problem except I want to use Windows authentication.
Tuesday, October 18, 2011 3:22 PM