Strong Naming Managed Assemblies - InfoPath Dev
in

InfoPath Dev

Strong Naming Managed Assemblies

Last post 02-02-2006 08:03 PM by Patrick Halstead. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 01-31-2006 06:40 PM

    Strong Naming Managed Assemblies

    Hi there

    I'm developing a .NET (C#) codebehind for an InfoPath form, using InfoPath 2003 SP1 and Visual Studio 2003 EntArch.

    Due to various reasons (mostly because I'm wanting to use Isolated Storage - long story!) I need to add a strong name to the DLL file assembly that Visual Studio generates. I'm just using the AssemblyKeyFile attribute in AssemblyInfo.cs. This, however, doesn't seem to be liked by InfoPath, which throws an error saying:



    InfoPath cannot open the selected form because of an error in the form's code.
    Request failed.



    whenever I load the form in preview mode.

    I suspect I need to update the manifest.xsf file inside the published XSN to point to the right assembly version, but I'm not sure whether this is correct, and if so, how to do this.

    Has anyone else managed to strong name a managed InfoPath assembly?

    Thanks!

    - John
  • 02-01-2006 04:13 PM In reply to

    Re: Strong Naming Managed Assemblies

    Hi

    We managed to resolve the issue - it's a pretty simple one actually. Adding the assembly attribute System.Security.AllowPartiallyTrustedCallersAttribute made it work fine.

    Hope this helps someone else out there.

    - John
  • 02-02-2006 08:03 PM In reply to

    Re: Strong Naming Managed Assemblies

    Hi John and welcome to our forum!
    Thanks for the great info!

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.