I have a test Biztalk project with an Orchestration containing a couple of Receive shapes, Send Shapes, and an Expression Shape. The 开发者_如何学GoExpression shape makes a call to a referenced dll that was written in C#. The C# dll is in the GAC, the class is marked as Serializable and the class has only one static method that is supposed to create a file on the disk in a folder.
Everything builds and deploys, but when I kick off the Orchestration by placing a file in the Receive folder, all the shapes do what they are supposed to do EXCEPT for the Expression shape. The code definitely works as I have tested it locally and the directory is one that the BT app is already accessing, so I don't think it is a security issue.
Below is the C# code and below that is how I am calling the code from the Expression shape, can anyone offer any suggestions as to what is going wrong?:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace TestHelp
{
[Serializable]
public class TestWrite
{
public static void CreateFile()
{
FileInfo fi = new FileInfo(@"C:\Unrecorded\Out\DataForProcess\Test.txt");
fi.Create();
}
}
}
Expression Shape code:
TestHelp.TestWrite.CreateFile();
If I had to guess I'd say probably that BizTalk is picking an older copy of the orchestration dll. Are you sure you updated it on the GAC or re-deployed before trying? Other than that, easiest way to find out what's going on is to just attach a debugger to the BizTalk instance (BTSNTSvcs.exe) and try to debug it... you could easily check this way if indeed your C# assembly is getting loaded and executed.
精彩评论