Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [code-access-security]

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.

Filter by
Sorted by
Tagged with
1 vote
1 answer

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 ...
Santhos's user avatar
  • 115
-1 votes
2 answers

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 ...
Shahid's user avatar
  • 229
1 vote
1 answer

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 ...
RobH's user avatar
  • 183
0 votes
1 answer

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 = SPContext.Current....
Shayan's user avatar
  • 105
5 votes
2 answers

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 (...
andrew.petersen15's user avatar
1 vote
1 answer

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 ...
Vamsi's user avatar
  • 1,541
2 votes
1 answer

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 ...
anchorPoint's user avatar