CSLA Security - Full Trust

January 23, 2008 02:31 by rclarkson

For some strange reason I had not run into this issue before.  It looks something like this....

 

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers.

 

 

I spent too much time looking for the solution.  I understood what needed to be accomplished but did not know how to get there.  I did not know that CSLA required Full Trust.  I just did not think about it.  What's weird is that there was nothing significant on the web to tell you how to fix it with CSLA.  Lots of options but no CLEAR example.  So if you are running a web site and need to allow for Full Trust then here you are.

 

In the web.config file between the <system.web></system.web> nodes add this....

<trust level="Full" originUrl="yourURL" processRequestInApplicationTrust = "True" />

This makes it quick and dirty.  I am sure you could make it even tighter but I just needed to get it up and running.  You can find more this setting here at http://msdn2.microsoft.com/en-us/library/tkscy493.aspx.  I now make it a practice to add this setting to all of my applications.


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

PublishEngine.Net Lives On!

January 22, 2008 01:03 by rclarkson

Based on recent contacts between me and another I have decided to spend some more time on PublishEngine.Net.

I think that as I spend more time on a working prototype and get it out there more people will be interested.

 

We'll see.  Meanwhile, I am working on a solution using CSLA.Net to handle the business objects.  I am looking for a simpler way to deal with the UI from CSLA.Net.  It works, but not as easily as I would like.

I am going to try LINQ against the Business Objects once I get a chance and have an opportunity to research what others have found out.


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5