file io permission with authenticode signed usercontrol in IE

Have a Windows forms usercontrol embedded in IE.  Control is authenticode signed.  Receiving Fileiopermission error after selecting file in FileDialog.  Adjusting Policy on client machine is not an option.  I've tried several combinations of Code Access Security configurations in code without success.

If I use assembly or class declaration such as: [FileIOPermission(SecurityAction.Demand, Unrestricted=true)], control will not even display.

new FileIOPermission(PermissionState.Unrestricted).Assert(); will not work either, but control does display and let me see files.

Thanks

Hayden


Answer this question

file io permission with authenticode signed usercontrol in IE

  • Rory Niland

    I used a MS support call and spoke to a IE development team member directly.  Basically they told me no way without changing client policy (which requires admin rights).  Authenticode must have some serious flaws for them to abandon its trust.  Hopefully, there will be a way in the future to accomplish this -- I can't be the only one complaining...

    The URL Moniker is interesting, but I'm weary about the overhead and support.

    Until then, I will continue to use the third party Java upload tool.  Shame is it not

    Thanks for the reply,

    Hayden

  • Piyush Jain

    Sorry hayden, I have no answer, just wanted to let you know that I'm in the same boat as you.  If you use the debugger and step though the code, your probably getting a SecurityException when you execute the "new FileIOPermission().Assert()" line.  My assembly is strong named, and I have played around with all the permissioning on the client machine, but to no avail.  This .Net security permissioning is a living hell, sorry for the outburst.

    Reading other threads, sounds like other people have the same problem, with no answers.

    Steve

  • AstareGod

    The GDN folks had to deal with this same issue when working with the problem you are facing.  I think they added an URL moniker to the global security policy that granted their URL where the assembly was located on the server FullTrust.  If you use Caspol it looks like this:

    1.6.  Url - http://www.gotdotnet.com/community/workspaces/*: FullTrust

    There are probably some other ways to do this as well, just using strongly named assembly evidence, but I haven't played around with it for a while.

  • file io permission with authenticode signed usercontrol in IE