Monday, 15 July 2013

Microsoft.ServiceModel.Channels.Common.ConnectionException: Due to an Oracle Client limitation, the adapter failed to open a connection.

BizTalk Custom WCF Adapter Error :

Microsoft.ServiceModel.Channels.Common.ConnectionException: Due to an Oracle Client limitation, the adapter failed to open a connection. This is because either (a) ambient transaction is present and the TNS alias is longer than 39 characters, or (b) ambient transaction is present and a non-TNS based URI was used. To resolve this, use a TNS alias to connect to Oracle and make sure it is not more than 39 characters.


Solution :

In the Send Port configuration adapter I used a WCF-Custom transport type and used oracleDBbinding as binding type.
In the oracleDBbinding I changed the following propertys:

"enableBizTalkCompatibilityMode" = True (For some reasons this i set to false per default)
"useAmbientTransaction" = False

Jumped to the Message tab and uncheck the "Use Transaction" box under Transactions.

Friday, 12 July 2013

BizTalk : Runtime assembly loading issue , Could not load file or assembly



BizTalk : Runtime assembly loading issue , Could not load file or assembly



If you require a specific version of  assembly to be loaded at runtime when your BizTalk application run. This requirement could be implemented by adding a required assembly setting in BTSNTSvc.exe.config. In biztalk config file you need to specify the old and new version of assembly that need to be loaded at runtime.



Following setting could be added in your BTSNTSvc.exe.config file with proper assembly details.



Using this Binding Policy in config, we can load the any required assembly at runtime..



<runtime>

                                <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

                                                <dependentAssembly>

                <assemblyIdentity name="BTSales.DataAccess" publicKeyToken="89b653f429c47342" culture="neutral" />

                    <bindingRedirect oldVersion="2.111.7.0" newVersion="4.112.1.2"/>

            </dependentAssembly>

                                </assemblyBinding>

                </runtime>


After implementing the above changes in BtsntSvc.exe.config file, if you are still getting this error while using  BTAdmin console then  update the BTSMMCLauncher.exe.config  file same as above. This will resolve your design time assembly loading issue.


Added following  thing in BTSMMCLauncher.exe.config , Reopen your BTS Admin console.
<runtime>

                                <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

                                                <dependentAssembly>

                <assemblyIdentity name="BTSales.DataAccess" publicKeyToken="89b653f429c47342" culture="neutral" />

                    <bindingRedirect oldVersion="2.111.7.0" newVersion="4.112.1.2"/>

            </dependentAssembly>

                                </assemblyBinding>

                </runtime>

Thursday, 11 July 2013

BizTalk error : Attempted to access an unloaded AppDomain.



BizTalk errorReason: Attempted to access an unloaded AppDomain.



While accessing WCf service in one of my BizTalk application, I received the following error.



There was a failure executing the receive pipeline: "Unknown " Source: "Unknown " Receive Port: TwoWayLatencyService_RcvPort" URI: "/.svc" Reason: Attempted to access an unloaded AppDomain.



Cause : This happens when there are several Web Services with the same Application Pool, and the first is inactive for a long period of time, all the others are inactive.



Solution : after restarting the IIS server it worked.