Pergunta

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 on the page:

Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

However, in a medium-trust environment, no problems.

Foi útil?

Solução

Both TemplateControl and TemplateParser requires minimal AspNetHostingPermission's so that shouldn't be a problem.

Try using PermCalc.exe (part of .NET 2.0 framework) to identify permissions needed for your assembly. It will output a permissionset where you can check the Demand elements for required permissions.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top