Load Operation failed for query 'Login'. T

2019-09-14 04:24发布

问题:

I'm working with Siverlight 5.0, RIA Services and Entity framework in my project.

When I deploy the application using VS, the application runs fine. However, when I use a web deployment project to publish the application, the first call to a RIA services service on the same system fails. An error similar to this is produced:

Load Operation failed for query 'Login'. The remote server returned an error: NotFound

I guess, the last message is not enough to get the concrete error. Suggest me what to do to provide you more information. I'm getting this error for two days and I'm getting desperate.

回答1:

The first thing I'd do is to enable WCF tracing, and then installing Fiddler to get more information about the communication. Every communication error with Silverlight comes back as NotFound, so your only real hope as far as the request/response itself goes is to have Fiddler give you a little extra insight. WCF tracing will hopefully give you some more info on what's happening on the server end. Finally, if possible, drop a debugger on the published application and insert a breakpoint to step through the issue.

That should hopefully give you more visibility on both the server and client side, with Fiddler giving you insight as to the communication that happens in between.

These sorts of errors are probably the biggest, or at least most common headache to working with Silverlight. Best of luck.



回答2:

RIA services can be a bit of a pain for this - it likes to return 404 whenever it can't do something...

You might find you have a deployment issue. RIA services dynamically creates the endpoints from the assemblies it has access to. Hopefully you know which assembly it is that is failing to load - if so, check your deployment directory to make sure the assembly is there, and use Fuslogvw to check whether there is an assembly binding issue.