Author: NickLocke | Posted on: 3/27/2010 5:32:12 AM | Views : 287

I have an ObjectDataSource which refers to a class in my business logic.  I have added this code
<Security.Permissions.PrincipalPermissionAttribute(Security.Permissions.SecurityAction.Demand, Role:="TestRole")> _
to a method within the class.  That is the method specified as the UpdateMethod of the ObjectDataSource.  The ObjectDataSource is attached to a FormView.
I am seeing the following behaviour:
Before I add the attribute, the update function works as expected; With the attribute, if the user has TestRole then the update works as expected; With the attribute, if the user doesn't have TestRole then the update method does not execute, but no exception is thrown. So, the functionality is restricting access to the method exactly as it should.  However, no exception is thrown when access is denied.
As an aside, I have ...

Go to the complete details ...