Category Archives: BizTalk Migration 2013

Unable to cast object of type ‘Microsoft.BizTalk.Streaming.VirtualStream’ to type ‘System.IO.MemoryStream’.


During our BizTalk migration, we have encountered below error in the BizTalk administration console. This was the generic Error BizTalk Will throw when you are having any issues while receiving the message from Partner

Reason: Unable to cast object of type ‘Microsoft.BizTalk.Streaming.VirtualStream’ to type ‘System.IO.MemoryStream’.

Upton now we have below cases (Types of issues found for this error).

Case 1:

We thought it would be certificate error and we are checking partner certificate and our certificate.

But when we checked the event viewer, we are seeing the below error and interestingly we are not seeing this Error in our old server when the partner is sending the same file again and again

So we compared the EDI settings of same party in Old server with new server and we identified the issue

Duplicate check functionality is enabled in new server and it was disabled in old server for interchange settings

New Server Interchange Settings

Old Server Interchange Settings

So disabled the settings and issue got fixed.

Case 2:

We have below error in the event viewer for the error message (Unable to cast object of type ‘Microsoft.BizTalk.Streaming.VirtualStream’ to type ‘System.IO.MemoryStream’.) in BizTalk Administration console.

The AS2 Decoder failed processing when validating the MIC value returned in the MDN. Details of the MDN message are

as follows: AS2-From:"Vendor1" AS2-To:"MyCompany"

MessageID:"<1875777344.1081412822113762.JavaMail.root@cmb2bi59>" OriginalMessageID:"5fe1e2b4-2400-4536-9202-

749f8ce2a795"

Resolution:

when we are sending the As2 Message with one certificate and we are receiving the MDN from different certificate, we will get this error

Case 3:

Reporting-UA: Integration Server

Original-Recipient: rfc822; Vendor

Final-Recipient: rfc822; Vendor

Original-Message-ID: 8d6a7516-3ca4-49e0-b4c2-cfcbcbe41293

Disposition: automatic-action/MDN-sent-automatically; processed/error: insufficient-message-security

Resolution:

we will get the below error when we received the MDN from Partner with a certificate which was not there in the

other people if that certificate is not configured at party level

Regards,

Visit site: http://www.sqlblogging.com

Send an Email: sqlblogging

Partner Received MDN with Expired Status


Hi All ,

When we received AS2 Message from partner, we will send the MDN to them.

As it is asynchronous model we will have dedicated send port for sending MDN to them with the filters having the AS2 ID of the partner, so that whenever we got the AS2 Message from Partner, we will extract As2 Message header properties and create the MDN message and store it in the Message Box, and our MDN send port subscription which is already in message box and BizTalk make this correlation and get the MDN message and send this MDN message to Partner.

But we are sending the MDNs to them when they sent the As2 Messages but it is having expired status at partner.

I have seen this issue happened at partner level due to below issues.

1. We are sending the MDN to them with the different certificate other than the certificate which was configured at partner end.

2. We are having the some string attached to AS2ID in the send port filter , ideally it should not go to partner, but BizTalk is sending the MDN to them , but for partner it was coming as expired.

Regards,

Visit site: http://www.sqlblogging.com

Send an Email: sqlblogging

Different AS2 ID Partner Profiles have Different Certificates for Single Party in BizTalk 2013


Hi All,

We got into a situation where we have 2 AS2 Profiles for one of the partner and they are sending the Message with signing and encrypted properties with the certificate

Signing will be done by partner with their private key certificate.

Encryption will be done by partner using the Our Public Key certificate.

We have a situation where our party have 2 AS2 Profiles and one will be doing EDI Transactions and other will doing XML Transaction.

In the old server , we are having the different parties for different profiles.

So those parties have their respective profile signing certificate configured. So it cannot be a issue.

But in 2013, we have merged 2 profiles under one party and for a party you can configure only one certificate at a time.

If partner is sending the message with one certificate then Party should configured with that signing certificate.

Resolution:

Remove the certificate from the party, so that BizTalk will check in the Certificate store for signing .

Regards,

Visit site: http://www.sqlblogging.com

Send an Email: sqlblogging

MDN missing in BizTalk 2013


Hi All,

When we tried to send any AS2 Message to the partner, they will send the MDN message for the As2 Message and this is the expected flow in B2b Solutions.

Somehow our BizTalk orchestration is not picking that message and orchestration instance is not closing.

After troubleshooting , we found the issue at AS2 Agreement in the BizTalk Party profile and the Process inbound MDN into MessageBox for routing/delivery options is not selected

We selected this property and recycled the App pool related to the partner URL and the issue got fixed.

Regards,

Visit site: http://www.sqlblogging.com

Send an Email: sqlblogging

Hidden GEM -Easy Way to Import All the Certificates with out any Scripts


Hi All,

Up to now we are using the PowerShell scripts to export and import all the certificates during the migration from one server to other servers.

This time we will use one simple solution that is there in the MMC console .

Open the MMC console from run

And select certificates

Go to any store that you want to import in another servers and select all the certificates and select export option.

Select below properties

Put the password

Give the location to export the certificicate

You have exported the PFX file, and go to destination server and select the store you want to import and import the certificate. That’s it.

Regards,

Visit site: http://www.sqlblogging.com

Send an Email: sqlblogging

Easy Way to GAC Many DLLS at a time in a Server


Hi All,

We have a situation in which we need to GAC 100 missing DLLs in one of the server, so we gathered missing DLLs in one folder.

We have taken below steps to work on this hassle-free .

1. Put all the DLLs in one folder, suppose put it into D:\GAC in the server

2. Open the command prompt in administrator mode and go to above mentioned folder location and check all the DLLs with DIR command

3. Run the below command in the command prompt to get the complete file path information of the DLLs information into one text file

dir /s/b > E:\ assemblyList.txt

4. Copy this file into location where GACutil.exe is present. You can download gacutil tool from Bing. Or you can find in the below link

http://cid-5ae3f43b1d873a75.office.live.com/self.aspx/Public/gacutil.zip

5. Run the below command to GAC all the Dlls that are present in the File

gacutil /il assemblyList.txt

Regards,

Visit site: http://www.sqlblogging.com

Send an Email: sqlblogging

Exporting and Importing BizTalk Rules


Hi All,

When you are importing the business rules from old servers to new servers In BizTalk Migration, better you should export the rules from the MSI export option.

If you export the rules using the MSI export option, the rules will be binded to the application at that time, so that you can identify which policy belongs to which application.

Below is the screen shot of the rules that were deployed with rules export option from old server.

While importing the rules using the MSI in the BizTalk, you will see the policies are already there error, in that case you need to change the status of the policies from the deployed to Published.

This can be done by in the All Artifacts Policies section and select all the policies and right clickà un-deploy

Regards,

Visit site: http://www.sqlblogging.com

Send an Email: sqlblogging

How To Get Parties,RoleLinks and their associated Send ports


Hi All,

We have a requirement to compare all the Parties that are enlisted in the role links in 2013 servers to 2009 servers, so I quickly created one Sql query to get the latest Role Links and their associated parties and send ports information in the 2009 BizTalk servers, so that it will be compared with 2013 Server information

Query:

USE BizTalkMgmtDb

SELECT party.nvcname [PartyName],

role.nvcname [RoleLink],

assembly.nvcfullname [Assembly],

sendport.nvcname [SendPort]

FROM bts_sendport sendport

INNER JOIN bts_party_sendport partysendport

ON partysendport.nsendportid = sendport.nid

INNER JOIN bts_enlistedparty_operation_mapping operationmapping

ON operationmapping.npartysendportid = partysendport.nid

INNER JOIN bts_enlistedparty_port_mapping portmapping

ON portmapping.nid = operationmapping.nportmappingid

INNER JOIN bts_enlistedparty enlistedparty

ON portmapping.nenlistedpartyid = enlistedparty.nid

INNER JOIN bts_party party

ON enlistedparty.npartyid = party.nid

INNER JOIN bts_role role

ON role.nid = enlistedparty.nroleid

INNER JOIN bts_rolelink_type rolelinktype

ON rolelinktype.nid = role.nrolelinktypeid

INNER JOIN bts_assembly assembly

ON assembly.nid = rolelinktype.nassemblyid

GROUP BY party.nvcname,

assembly.nvcfullname,

role. nvcname,

sendport.nvcname

Result:

Get the above result from 2009 and 2013 environments and copy into excel sheets and compare with beyond compare tool, if the e role link migration in 2013 was completed. Else use the 2009 result while applying the parties in BizTalk 2013 role links

Regards,

Visit site: http://www.sqlblogging.com

Send an Email: sqlblogging

How to Get the Latest Policies from BizTalk Server


Hi All,

We have a requirement to compare all the business Policies fter migrating from 2009 to 2013 servers, so I quickly created one Sql query to get the latest rules in the 2009 BizTalk servers, so that it will be compared with 2013 latest rules.

Query:

USE BizTalkDTADb

USE BizTalkDTADb

SELECT drs.strName[PolicyName],cast(drs.nmajor as varchar(2))+’.’+cast(drs.nminor as varchar(2))’PolicyVersion’
FROM (SELECT ROW_NUMBER() OVER(PARTITION BY strName order by strName asc, nmajor desc,nminor desc) [Rownum],strName,
nmajor,nminor
FROM dta_RuleSets(nolock) where dtUnDeployTime IS NULL ) AS drs
WHERE drs.[Rownum] = 1

Result:

Regards,

Visit site: http://www.sqlblogging.com

Send an Email: sqlblogging

An error occurred while attempting to install the BizTalk application: A file load exception occurred while attempting to install the assembly into the Global Assembly Cache. This error may occur if the assembly is delay signed, or if assembly was renamed


Hi All,

While doing the migration, we need to deploy and install the MSI from old server to new server, while Installing the MSI after we successfully imported into BizTalk Administration console, we are getting the below error.

An error occurred while attempting to install the BizTalk application: A file load exception occurred while attempting to install the assembly into the Global Assembly Cache. This error may occur if the assembly is delay signed, or if assembly was renamed after creating/signing. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Solution that worked for me:

Go to each and every server and import the MSI Manually in to the administration console, don’t do the installation of MSI

When you are doing the MSI import, MSI will be imported in to BizTalk Mgmt DB and also it will be GACed.

Regards,

Visit site: http://www.sqlblogging.com

Send an Email: sqlblogging

Design a site like this with WordPress.com
Get started