Skip to main content

Posts

BizTalk SendPort file name support/macro

BizTalk Send Port with File Adapter supports the following formats (macros) for the file saved. %MessageID% %datetime% %SourceFileName% %time%

Difference between publishing schema and publishing an orchestration as a WCF Service

Difference between publishing schema and publishing an orchestration as a WCF Service Publishing Schema as Endpoint Publishing Orchestration as Endpoint Orchestration Completing not require - publishing Schema as service will enable your subscribers get your Data Contracts and they can begin their development. Your subscribers don’t have to wait till you complete your business logic. Orchestration should be completed - Publishing an orchestration requires you to get ready with the Orchestration development at first place or let your subscribers wait till you finish your orchestration development. Orchestration will be loosely coupled- you are free to update/add new orchestration subscribing to specified message contract Orchestration will be tightly coupled – After updating/changing orchestration need republish the Endpoint. During publishing wizard, we need to select the schema and need to specify the request/response message. During Publishing wizard, we ...

BizTalk : Custom XSLT to reomve empty node from XML request

Using XSLT to Remove Empty Node from request. ·          To implement this, we simply create one additional step in process/orchestration. ·          Add new map with Source schema same as destination schema. ·          Use the following custom XSLT code to scan the request and remove all empty node. Map with same schema as request and response. Use the following xslt file with your schema namespace. <? xml version ="1.0" ?> < xsl:stylesheet xmlns : xsl ="-- YOUR NAMESPACE --" version ="1.0" xmlns : ns0 ="http://www.w3.org/2001/XMLSchema-instance">     < xsl:output method ="xml" indent ="yes" />     < xsl:template match ="node()">         < xsl:if test ="count(descendant::text()[string-length(normalize-space(.))>0]|@*)"> ...

Get the RegisteryKey value

Following sample code can be used to get RegisteryKey value based on keyPath and KeyName public static String GetRegistryValue( String regKeyPath, String regKeyName) { // Create value variable string regValue = null ; try { // Opening the registry key RegistryKey rk = Registry .LocalMachine; // Open a subKey as read-only RegistryKey regKey = rk.OpenSubKey(regKeyPath, RegistryKeyPermissionCheck .ReadSubTree, System.Security.AccessControl. RegistryRights .FullControl); // If the RegistrySubKey does exist if (regKey != null ) { // If the RegistryKey exists get its value or null is returned. regValue = ( string )regKey.GetValue(regKeyName.ToUpper()); } return regValue; } catch ( Exception ex) { throw ex; } }

Read PublicKey from Assembly using sn.exe

To get PublicKey for assembly we need to use sn.exe SKD provided by microsoft. Run a Visual Studio 2008/10 command prompt (Visual Studio Tool + Visual Studio 2008/10 Command Prompt from the “Start” menu). Enter the following command: sn -Tp "C:/myassembly.dll" Where “ myassembly .dll” is the name of the signed assembly. sn -Tp (assembly full path)

Regular Expression to remove non-printable character

Following simple regular expression can be used to reomve non-printable charcter from your string or data. Code Sample : string str = "342343\r\n24232234234234234" ;   Regex digitsOnly = new Regex ( @"[\x00-\x1F]" ); str= digitsOnly.Replace(str, "" ); ASCII code table

IIS Application browsing error " Oracle.DataAccess Incorrect Format"

Error : Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format. Solution : In the IIS Manager select your server and select " Application Pools ". Select the application pool used by your Web App and click on " Advanced Settings " from the right hand menu. In the " General Section " of the advanced Settings click on the " Enable 32-bit Applications " and set it to True . This fix only applies to 64-bit servers that attempt to execute the 32-bit version of the Oracle Dlls.