Custom task panes and security

K

Kelley Smoot

I've researched adding custom task panes to our InfoPath project, following
the style described in this article:
http://blogs.msdn.com/infopath/archive/2004/09/27/234911.aspx

This article, and many posts by the MVPs in this forum and others, have all
said that the IP Form should be fully trusted. However, the only way I can
get the example in the code above to work is to:
1. Assign Domain level security
2. Sign it with a certificate
3. Deploy the form to Sharepoint

It will run without any problem or throwing any errors, when accessed from
Sharepoint.

If I try to run it locally, the code throws errors in an unexpected plase.
This JScript line (from the example listed above) will run without problem

XDoc.Extension.SetTaskPaneWindow(window);

An alert from the IPForm will be thrown, indicating that it is setting the
window object's variable. You can set a breakpoint & step through the
IPForm's code and see that the IP Form Code's method SetTaskPaneWindow() is
being executed.

I've added a second call in the JScript of the task pane page (aspx page,
hosted locally on my machine) which calls a second method

XDoc.Extension.DiagnosisCodeListTaskPaneLoaded();

and here's where the fun begins. Now an error pops up, generated from the
JScript that says: That assembly does not allow partially trusted callers.
If you choose to debug, the Microsoft Script Editor shows the call to
DiagnosisCodeListTaskPaneLoaded() is the problem and explicitly states
"TaskPane: That assembly does not allow partially trusted callers."

What doesn't make any sense is that the same block of JScript code just
called into the IPForm without an error!

I've tried to use the .Net Framework Configuration tool to give the aspx
page Full Trust (using both a strong name and trying it by site) and nothing
seems to work. No matter what I try, the aspx page is never granted Full
Trust and these errors are thrown.

Any solutions as to how to grant the aspx page Full Trust?

Kelley
 
B

Bob C.

This type of security issue would probably explane why the "asp.net 2.0
wizard control" doesn't function properly. Only the next/prior buttons work,
the menu on the left side doesn't fire events when clicked...
 

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