Tuesday, 28 March 2017

System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security

Hi All,

Sometimes we get this exception and keep stuck for long time. Even in event log you can't see and understand much information about this error.

But the solution of this error is very easy:

Try to run the .exe or .bat or the application As Administrator.

I hope this helps.

Monday, 8 August 2016

Microsoft BizTalk 2013 Accelerator for HL7 -- Service cannot be started. System.Runtime.Remoting.RemotingException: .Config file '%Drive%:\XXXX\XXXX\Bin\AuditingLoggingService.config' cannot be read successfully due to exception 'System.IO.FileNotFoundException: The system cannot find the file specified.


Hi All,

While installing HL7 or while starting HL7 Logging Service this error may occur

When you check your event viewer you will find error saying

Service cannot be started. System.Runtime.Remoting.RemotingException: .Config file '%Drive%:\XXXX\XXXX\Bin\AuditingLoggingService.config' cannot be read successfully due to exception 'System.IO.FileNotFoundException: The system cannot find the file specified. 

it will look like below


Cause: The error is quite self explanatory. it is not able to find AuditingLoggingService.config file.

Solution:  Check if the file exists or not in your system. If exists but at different location then copy the file and paste at specified location.

If not exists :

Open notepad or notepad++ 

Just copy below text :

<configuration><system.runtime.remoting><application name="alserver"><service><wellknown mode="Singleton" type="Microsoft.Solutions.BTAHL7.AuditingLogging.EventBroker, Microsoft.Solutions.BTAHL7.AuditingLogging" objectUri="EventBroker" /></service><channels><channel ref="tcp" port="4000" rejectRemoteRequests="true"><serverProviders><provider ref="wsdl" /><formatter ref="binary" typeFilterLevel="Full" /></serverProviders></channel></channels></application></system.runtime.remoting><appSettings><add key="ConfigDb" value="Integrated Security=SSPI;database=BTAHL7;server=BTS2010DEV" /></appSettings></configuration>

And save it with name as AuditingLoggingService.config

Now copy this file and paste at the specified location and continue with the Insatallation.

Thanks Anshu Kumar


Tuesday, 12 July 2016

Create Additional Node in Target Schema using XSLT in Biztalk Map


Hi All,

Before telling the requirement I would show you my source schema, Sample file and target schema so that you can easily understand the Scenario:

Source Schema:
In this Product node is Set max occur=Unbound

Sample Source File:

Target Schema:

In Target Schema Count max occur =Unbound.

Now my requirement is that I have to take the value of element Cost price from all repeated node from source and Add it and assign to Count in target schema and element name "CostPrice" should be assigned to CountName Attribute.

For Example Output would be like:


As you can see we have Cost price repeated three times in source file and values are 40,50,30 so addition will be 120. So we have assigned 120 to count and under attribute "countname" we assigned the name of element from where we received these values for this example that is "CostPrice".

The same thing we want to do with SellPrice, So my final output would look like:



Solution:

To achieve this target we would use Scripting functoid and under that we will select Inline XSLT Call Template.

The map will look like:




Under scripting Functoid we have selected Inline XSLT Call Tempelate like below.



Here is the XSLT code written Under the tempelate:

<xsl:template name="MyXsltConcatTemplate">
    <xsl:variable name="var:v2" select="sum(/s0:Products/Product/Prices/CostPrice)" />
    <xsl:variable name="var:v4" select="sum(/s0:Products/Product/Prices/SellPrice)" />
 <Counts>
        <Count>
          <xsl:attribute name="countname">CostPrice</xsl:attribute>
          <xsl:value-of select="$var:v2" />
        </Count>
        <Count>
          <xsl:attribute name="countname">SellPrice</xsl:attribute>
          <xsl:value-of select="$var:v4" />
        </Count>
      </Counts>
</xsl:template>


Thanks.

Anshu Kumar


Tuesday, 28 June 2016

Remove or Supress optional empty elements from target schema in Biztalk map (STRING Data Type)

Dear All,

I have a situation where in my target schema there are some optional elements whose data types are string. That elements can have value or may not have value. It means that element min occcur=0 and max occur = 1.

It will look like Name Element below snap in Source Schema:

Or  We may get empty single space under that element in source Schema like below Snap:


Solution:

By Using two functoids we can achieve this target:

1. Greater Than Functoid under Logical Functoids

2.Value mapping Functoid Under Advance Functoid.

The map will look like like below Snap:


Here in this map Name is having null value so what we did we took Greater than Functoid and that have two input parameters. In first parameter linked Name element to it and in Second parameter given one empty Space like below Snap:


and then in value mapping functoid linked first input as greater than functoid and second input parameter as Name element like below snap:



Thanks.










Get max length of data for a column in Oracle


There is a situation where a column of varchar type max length is 50. what my requirement is to know the max and min length of the data stored in that column.

Here are the queries:

Max Length of data:

Select max(length(your_col_name)) as max_length From your_table_name;

Min Length of data:

Select min(length(your_col_name)) as max_length From your_table_name;


Tuesday, 15 September 2015

There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive Port: "WcfReceivePort_OracleDBBinding_XXXXXXX" URI: "oracledb://XX.XXX.XX.XX:XXXX/XXXXX/Dedicated" Reason: Cannot locate document specification because multiple schemas matched the message type "http://Microsoft.LobServices.OracleDB/2007/03/POLLINGSTMT#POLLINGSTMT".

ERROR:

There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive Port: "WcfReceivePort_OracleDBBinding_XXXXXXX" URI: "oracledb://XX.XXX.XX.XX:XXXX/XXXXX/Dedicated" Reason: Cannot locate document specification because multiple schemas matched the message type "http://Microsoft.LobServices.OracleDB/2007/03/POLLINGSTMT#POLLINGSTMT".


SOLUTION:

Go to your receive location and double click on browse button of XML pipeline you will get a pop up window like below :


















As you can see the first option "Allow UnrecognizedMessage" is set to "FALSE', Make it true:
I hope your error will be gone:

After making it true if you are again getting the same error then:

There is another application that uses a schema generated using the POLLINGSTMT operation
To avoid this, when you specify your connection settings to generate your metadata in VS, you should specify a unique POLLING ID (on the connection details tab), and then use the same POLLING ID when configuring your receive port too.

Thank you

Monday, 14 September 2015

Custom Pipeline to remove Unknown/Unwanted/ Characters from Incoming XML message in Biztalk.

Hi Friends,

I got a requirement where I was receiving a incoming xml message from client, that I had to process in Biztalk.

But when we received that message what we found that there was some unknown characters was added as header in that xml file. because of that files were failing at pipeline level. 

Due to some limitations client was not able to remove that header. So I had one option to use custom pipeline to remove that extra unwanted characters and make a valid xml message.

This is my scenario but you can take this example as reference for your requirement if you have:

First I will Show you the incoming message what I was getting from client:























This is my input message. in this message the part I have highlighted from Yellow color is the Unwanted characters which has been added as Header.

The part which is not highlighted, is the actual message what I suppose to receive.

The actual message will be like below snapshot:












Solution:

I will paste the complete code down, but before I would like to give a brief details what I am doing in that code.

Please note its my solution for my requirement specific to me:

I am searching for the position of string <?xml in the incoming message and wherever I am getting that string I am removing from index 0 till that position of <?xml. This I am using at Decode level in custom pipeline.

Here is my code below:






Steps To use this pipeline:

1.Sign in the DLL.
2.Register the DLL in GAC
3.Copy the DLL to Biztalk pipeline component folder.


Thank you for reading this.

Anshu Kumar