且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Biztalk自定义文件适配器

更新时间:2022-10-19 13:39:25

通过此论坛调试代码非常困难。


当以下代码需要更长时间才能完成时会发生此错误。

 using(ReceiveBatch batch = new ReceiveBatch(this.transportProxy,this.controlledTermination,batchInfo) .OnBatchComplete,this.properties.MaximumNumberOfFiles))
{
的foreach(在文件BatchMessage文件)
{
//提交文件进行批处理
batch.SubmitMessage(文件.Message,file.UserData);
}

batch.Done(null);
}




Hi,

Recently i have faced this below issue. please guide me if any one already faced similar issue. i am using Biztalk server 2013

"Could not stop the BizTalk Service BizTalk Group : BizTalkServerApplication 
service on Local Computer. 
Error 1053: The service did not respond to the stop or control request in a 
timely fashion

when i checked event log, i am getting like "A timeout was reached (30000 milliseconds) while waiting for the BizTalk Service BizTalk Group "

this is came after i deployed the custom file adapter.

Actually i took the sdk samples[File Adapter] from biztalk server location path , for doing zero byte file receving process.

I made few lines of code for promoting few properties.

then, i used registry file to register the assemblies.

Now i am able to receive the zero byte files and send the same file to some other location vai send port. It is woking perfectly. 

but when i tried to restart the host instance , i am getting the above error. i am not sure why it is coming.

i am sure about that i am getting this error if i am used custom file adaper. since if i run other  biztalk application , i dont have any issue. but if i run , the custom file adapter application . i am able to recreate this issue.

Also, i debugged, and find out which place i am getting

this.batch.SubmitMessage(file.Message, file.UserData); this is the method call to push the msg to biztalk db. I think some references object are not removed. when i verified the method call, it goes several event handler function. i am unable to follow that.

Can any one help me is there any this i need to do in custom file adapter?


Its really tough to do debug your code thru this forum.

This error happens when the following code take longer time to complete.

  using (ReceiveBatch batch = new ReceiveBatch(this.transportProxy, this.controlledTermination, batchInfo.OnBatchComplete, this.properties.MaximumNumberOfFiles))
            {
                foreach (BatchMessage file in files)
                {
                    // submit file to batch
                    batch.SubmitMessage(file.Message, file.UserData);
                }

                batch.Done(null);
            }