Declarative Code Access Security
-
Hi, I am attempting to use declarative code access security to protect my C# web application. I am using [UrlCodeIdentityPermissionAttribute(SecurityAction.Demand, Url = "http://www.microsoft.com")] outside of the main class in my dll. I understand that this means that if a website other than Microsoft calls my dll code they should be refused access to the protected class - an exception should be thrown. When I call my dll code from another program, access is always granted. Is my understanding of declarative code access security incorrect? What am I doing wrong? Any help would be greatly received. I am new to this area and am finding it difficult to find code examples of such code. Examples of imperative security would also be useful Thankyou, Kerry