开发者

Silverlight Application gives 4004 error when trying to use RIA services

开发者 https://www.devze.com 2023-03-12 11:40 出处:网络
I have written a Silverlight application that is basically an account registration form.I have been able to successfully deploy this to one of our production servers running windows server 2008/IIS7.W

I have written a Silverlight application that is basically an account registration form. I have been able to successfully deploy this to one of our production servers running windows server 2008/IIS7. While this took some time to do, I was able to work through and solve the issues that came up fairly easily. Now I am trying to deploy the application on our main production server. This server is running windows 2003/IIS6 and this is where I have hit some problems.

I have solved most of the issues and now the silverlight application will load and I can see the form for a few seconds before it disappears. I believe during this time it is trying to load data from the database using the RIA services.

In IE I get the following error:

Webpage error details

Message: Unhandled Error in Silverlight Application 
Code: 4004    
Category: ManagedRuntimeError       
Message: System.Windows.Markup.XamlParseException:
System.Windows.Markup.XamlParseException: 
System.Windows.Markup.XamlParseException: 
Cannot find a Resource with the Name/Key ApplicationResources [Line: 6 Position: 9]

I believe it must be a configuration issue in IIS6 because the app works fine on IIS7 but I am drawing a blank as to what to try. I have spent hours trying to find a solution to this particular problem and while others have mentioned getting this problem the answers always tend to be non-specific in nature.

This is what I have done so far:

  • Added New Application Pool for .NET 4开发者_如何学运维.
  • Set the website to use .NET 4 on the ASP.NET tab (nearly had heart failure when this did an iisreset).
  • Added the MIME types for Silverlight .xaml, .xap, etc.
  • Unchecked Integrated Windows Authentication (was giving an error when checked).
  • Give Execute permissions to Scripts and Executables.
  • Recycled the application pool.

The one thing I have seen suggested but have not tried is an iisreset, and while I am not entirely convinced that doing this would solve the problem, we have scheduled this to be done tonight (if I cannot find a solution before then).

So basically I am wondering if anyone out there has seen this problem and knows how to solve it?

UPDATE 1: We tried an iisreset last night and as I expected this did not solve the problem.


Okay I have solved the problem. As suggested I did a WCF trace on the application. This highlighted the REAL problem straight away, which was 'The SELECT permission was denied on the object...'. Once I fixed this the application works as I expected. It turns out that a colleague of mine had already made this permission change on our other server (running IIS7) so that was why it worked there (this is bad - I know).

Also it didn't help that the javascript error I was receiving on the client side (shown in the question) had nothing to do with the underlying issue and led me well and truly up the garden path.

0

精彩评论

暂无评论...
验证码 换一张
取 消