Code Access Security

L

larko_s

Is there a way around CAS? I would like to be able to use the SharePoint OM
in an external assembly that is called from web-enabled forms.
 
S

S.Y.M. Wong-A-Ton

No. The SharePoint assemblies demand their callers to have certain
permissions. The only way around this is to give the assemblies that make
calls into the SharePoint OM full trust. Assemblies that have full trust are
except of CAS checks.
 
L

larko_s

How do I give these assemblies full trust?

S.Y.M. Wong-A-Ton said:
No. The SharePoint assemblies demand their callers to have certain
permissions. The only way around this is to give the assemblies that make
calls into the SharePoint OM full trust. Assemblies that have full trust are
except of CAS checks.
 
L

larko_s

The assembly is already in the GAC and the web app that the form is being
opened in has the <Trust=Full />.
 
S

S.Y.M. Wong-A-Ton

It sounds like you've set up full trust for the assemblies and the web page,
but not for the InfoPath form template. All callers in the chain must have
full trust. So if your InfoPath form template is calling an assembly which in
turn calls the SharePoint OM, you must give both the InfoPath form template
and the assembly full trust. If you have not already done so, sign the form
template with a digital certificate and give it full trust, and see if that
helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top