1
votes

Scenario: Integrating external web application with secure information. Web site calls BizTalk WCF service with one (or more) fields that have been encrypted with web site's encryption class. Inside the publish map I need to convert the web encryption to BizTalk environment encryption (yes, the differences are necessary). This used to be done in the SOAP asmx web service data types code but now needs to be done either in the map or pipeline. Map seemed easiest to implement with scripting functoid reference to external assembly where I call decryptor for the one and re-encrypt with the other pretty much exactly like I did in old web service.

Problem: External assembly is relatively simple in that it consists of one class with default constructor no arguments, with one public method the takes a string and returns a string. Input is web encrypted valve, output is my encryption value. I reference 3 custom libraries for this encryption swap inside the method. None of the referenced assemblies are being called from the scripting functoid. All are added as references in map project. All are strong-named. All are GAC'd.

Yet, when I test the map it gives the following error:

Function 'ScriptNS0:Myfunction()' has failed. Exception has been thrown by the target of an invocation. Could not load file or assembly 'OurCompany.Project.WebEncryption, Version=1.0.0.0, Culture=neutral, PublicKeyToken=123654789abcd' or one of its dependencies. The system cannot find the file specified.

I double checked versions etc in the GAC_MSIL folder and everything matches. What gives?

1
Is this a .NET 4 assembly or a .NET 2 assembly? Might be a different GAC altogether.Pieter Vandenheede
Have you restarted your host instances?Pieter Vandenheede
No. Using Test Map function in Visual Studio. Host Instances are not part of the equation at this step.silverbugg

1 Answers

2
votes

ARRRGGGG! Curse you Visual Studio! VS was not picking up the changes to the GAC and additionally I don't believe it liked my original dotted namespace/assembly name. I simplified to MapScripting for NS/Asm and restarted VS and it worked. UGH!