| Andy's profileAndy's WarholeBlogLists | Help |
Andy's Warhole |
|||||||||||||||||||||||||||||||
|
|
Flat File DisassemblerWhile I was developing a flat file disassembler flat file component to handle multiple flat file formats, I was completely brought off track by something I found on Gilles’ Weblog: ‘In a pipeline component, some streams are not seekable: Improvements to the Archiver’. The confusing text was:
However, when testing my pipeline component the messages seemed to disappear. The message types were determined correctly, the document specification name was determined correctly, but my message did not appear in the output location. After a lot of frustration and time, it finally hit me; maybe the resulting stream was empty. I thought, because of the comment mentioned above, that I was dealing with a copy of the stream, but according to the MSDN:
So, instead of dealing with a copy I was dealing with a clone of the stream. Adding the following lines solved the problem, pffff: // Preserve the stream position // Restore the stream position Failed to access IIS metabaseRecently I was working with WCF and ran into the following error:
The solution was simple. Executing the below statement solved the problem.
The error indicates that the .NET Framework is not registered with IIS. The .NET Framework detects which versions of IIS exist when the .NET Framework is installed, and it automatically registers itself with IIS. If IIS does not exist when .NET Framework is installed, the .NET Framework is not registered with IIS. The command with -i switch is used for installing ASP.NET and upgrading all application pools to ASP.NET version which came with the ASP.NET IIS Registration Tool. It will ignore the previous version of application pool. See Microsoft: ASP.NET IIS Registration Tool (aspnet_regiis.exe). The node to be inserted is from a different document contextOften, when I first try to copy a node from one XML document to another I get the following error:
This time it was because I used InsertAfter() incorrectly.
When copying a node from one document to another you have to use ImportNode() and then add that node to the document.
I have to keep remembering this. BizTalk mapping behavioursWhen using the multiplication functoid in the BizTalk mapper I ran into some strange behaviour. In the source schema I had two elements: Price, defined as string, and NumberOfTransactions, also defined as string. I used the multiplication functoid the determine the TotalSalesAmount, again defined as string with restriction ^-?(\d{0,16})(\.\d{1,4})?$, in the destination schema. The result surprised me; the price, 0.0340, multiplied by the transctions, 6, resulted in a total amount of 0.20400000000000002. Obviously, the result was not the result I wanted to see. So, I tried using a custom scriptoid. The scriptoid contained the following functoin:
The result again did not meet my expectations. The total amount ended up being 0.20400000000000002. After being puzzled for a couple of minutes I found the answer. The above code needed just a little adjustment. The final code is:
I simply had to explicitly convert the result back into the right datatype, i.e. string, using the defined culture. Another valuable leason learned. Macros in Send File AdapterI always seem to forget the most common macros when using the Send File Adapter in BizTalk, so this is a reminder.
|
|
|||||||||||||||||||||||||||||
|
|