Code Access Security is a part of the .NET Framework. It can be used to restrict code from calling other code that is considered to perform a privileged action.

learn more… | top users | synonyms

1
vote
1answer
319 views

How to configure custom CAS deployed through WSP package

I have been struggling with deployment of custom CAS. When I deploy my WSP package I get the following error: Security Exception Description: The application attempted to perform an operation ...
-1
votes
2answers
252 views

How to open site in InfoPath by Code ?

How to open sharepoint site in InfoPath by coding ? I have written this code, SPSite site = new SPSite("http:/MyServer/sites/MySite/"); SPWeb web = site.OpenWeb(); but it throws this error. "The ...
1
vote
1answer
51 views

Turning on information management policy causes security exception

I have some code: SPFieldMultiChoice category = (SPFieldMultiChoice)contentType.Fields["Category"]; Where contentType is a SPContentType instance. This works fine as part of some code ...
0
votes
1answer
1k views

SPContext.Current.Web and security exepction

I write a webpart in C# for sharepoint 2007 .When i try to create instance of SPSite or SPWeb , for example: SPSite sit = new SPSite("http://sharepoint"); or SPSite sit = ...
4
votes
2answers
1k views

Sandbox Webpart Web Requests: System.Security.SecurityException

I need a custom web part that aggregates list data across web applications. I would like to keep it sandboxed if at all possible. I first tried to use the out of the box SharePoint web services ...
1
vote
1answer
1k views

Unable to resolve The file '/_controltemplates/xxxxxxx.ascx' does not exist.

I have developed a custom user control and loading it in a webpart, the aim to run the webpart from bin with custom policy. I made the WSP Builder generate the CAS policy and it does contain the ...
2
votes
1answer
219 views

SharePoint Code Access Security-requirements to call Page.TemplateControl.ParseControl

What are the CAS policy requirements to call the method Page.TemplateControl.ParseControl? Specifically, in SharePoint I've tried to call the method in a Minimum-trust environment, but get this error ...