Hi, I'm trying to write an WPF Browser Application with DO4. I came accross something I do not understand. I get an exception on the Domain.Build(conf) during execution. It says something about security. Any clues what it could be. Here's the exception: Inheritance security rules violated while overriding member: 'Xtensive.Storage.Entity.System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden. A description of the code can be found on my blog (http://paul.sinnema.ch/?p=118). Regards Paul Sinnema Diartis AG Updated at 20.06.2010 12:42:49Hi Alex, Found a post about the same problem here: http://social.msdn.microsoft.com/Forums ... a4918c6ee5 Regards Paul Sinnema Diartis AG Updated at 20.06.2010 12:47:41Hi Alex,
No, does not help me. Applied it in the App.xaml.cs above the namespace like this:
Regards Paul Sinnema Diartis AG Updated at 20.06.2010 14:34:39Alex, I guess there's something wrong in the solution. I've divided the application into 1) the WPF Browser Application and 2) a class library containing the DO4 objects. I try and initialize the DO4 Domain from the WPF app using the Session Getter on the class you find in my blog. At first I got an exception that I needed to add some XTensive Assembly to the WPF App project. When I start the 'add reference' I don't see the assemblies in the Assemblies list. I went on and browsed for them in the 'C:\Program Files (x86)\DataObjects.Net\Bin\Release' directory. Maybe that's causing the problem. Regards Paul Sinnema Diartis AG Updated at 20.06.2010 14:49:48
How do I do that?[/quote:phn1eh6v] Found the solution here, very simple: http://blogs.microsoft.co.il/blogs/maxi ... ation.aspx Regards Paul Sinnema Diartis AG Updated at 22.06.2010 19:18:41Alex, With Full Trust activated the local run is ok, but when I publish it to my website I get error concerning 'trust'. When I make it a partial trust again. The application is download from the website but then the old error is back again. I have no clue how to solve this. Regards Paul Sinnema Diartis AG This thread was imported from our support forum. The original discussion may contain more detailed answer. |
Most likely, that's because we didn't put new security attributes added in .NET 4. Try applying [assembly: System.Security.SecurityRules(System.Security.SecurityRuleSet.Level1)] to your WPF project to temporarily workaround the issue. I'm studying what should be done related to new .NET 4 security model right now. > No upgrade handler is found for assembly 'OrmMatrix', version '1.0.0.0'. Most likely you've changed version of your assembly with persistent types and run Domain.Build in Perform or PerformSafely mode. v1.0.0.0 is the original version of your assembly. > When I start the 'add reference' I don't see the assemblies in the Assemblies list. Just fixed, the update will be published in a day or two. Issue: http://code.google.com/p/dataobjectsdot ... ail?id=708 And issue about security: http://code.google.com/p/dataobjectsdot ... ail?id=707 Btw, you'll anyway need full trust. But now all the methods requiring elevated priviligies are properly annotated. Earlier (i.e. in your version) there were no .NET 4 secutrity annotations, that's equivalent to a case when all the methods are marked as [SecurityCritical] = require full trust. May be there is something wrong with certificate it is signed by (I simply don't imagine what else may differ / affect here)? I so, I almost sure this is covered in big list of comments below the article about publishing full-trust WPF-XBAP. I don't have experience with WPF browser apps, so may be I'm wrong. I understood the cause: there is no neither [LinkDemand] nor [SecirityCritical] is applied to Entity.GetObjectData method. Can you try to run the application with full trust? I'm already fixing the issue.
How do I do that? Alex, The application now continues without the previous exception, but now running into the next exception. No upgrade handler is found for assembly 'OrmMatrix', version '1.0.0.0'. Regards Paul Sinnema Diartis AG Alex, Everything is running smoothly locally. Look here http://paul.sinnema.ch/?p=118 Regards, Paul Sinnema Diartis AG
|
Today i faced with same problem as this in my ASP.NET MVC app:
You write here that you fixed it, but it seems to me as not fixed, at version 4.4.0.7571. Update: I must say that my asp.net app is hosted on external webhosting, and i dont know if they have some .net security restrictions or what. |