Michael Stephenson

Microsoft BPM/SOA Adventures
posts - 132, comments - 93, trackbacks - 15

My Links

News

View Michael Stephenson's profile on LinkedIn

Archives

Post Categories

Image Galleries

BizTalk

Mates

Problem Enlisting Send Port

Problem

I came across the following problem the other day.  I had setup a send port to pick up messages from the messagebox.  I then enlisted and started it.  All good so far.

To ensure this port was setup as part of the build I exported the bindings.

At this point I need to mention a little about the build process for our solution.  On the project we have a large number of test environments so in order to simplify the management of config settings between environments the solution contains a custom MsBuild task which will use a custom xml dictionary and a template of the binding file.

During the build the process will run the template against the dictionary and produce a number of correctly configured files for each environment.  We typically do this with the BizTalk config file, WSE Adapter policy cache and each applications binding files.

In this particular instance when I amended the template and produced the new bindings to use for this application I started getting the following error once they had been imported and I tried to enlist the ports.

"Could not enlist send port '[Send Port Name]' Exception from HRESULT: 0xC00CE557(Microsoft.BizTalk.ExplorerOM) "

The binding file would import without error so I assumed it was something related to setting up subscriptions when the port was enlisted which for this port indicated a problem with the filter.

When I checked the filter page of the port settings there was no filter listed yet there is a filter defined in the bindings file.

Work Around

After some experimentation I found that it was definately the filter and I think what was happening was that when I edited the file and saved it through Visual Studio it must be affecting the encoding of the file when it was saved.  When I edited the file through Visual Studio I could not successfully import the bindings to setup the port.  If I configured the template only through Notepad the import of bindings into BizTalk would setup the filter correctly.

Something to consider if you experience a similar problem

UPDATE!!

I actually found the cause of the problem for this.  Basically when I opened the binding file in Visual Studio somehow the xml within the filter property of the send port had reformatted slightly.  It should be like below:

<Filter>&lt;?xml version="1.0" encoding="utf-16"?&gt;

                                &lt;Filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;

                                &lt;Group&gt;

                                &lt;Statement Property="BTS.MessageType" Operator="0" Value="http://Acme#Remittance" /&gt;

                                &lt;/Group&gt;

                                &lt;/Filter&gt;</Filter>

But it had changed to the following:

 

<Filter>

&lt;?xml version="1.0" encoding="utf-16"?&gt;

                                &lt;Filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;

                                &lt;Group&gt;

                                &lt;Statement Property="BTS.MessageType" Operator="0" Value="http://Acme#Remittance" /&gt;

                                &lt;/Group&gt;

                                &lt;/Filter&gt;

</Filter>

The key difference is the new line before and after the content within the element.  When I removed these it imported correctly.

Print | posted on Saturday, January 12, 2008 11:24 AM | Filed Under [ BizTalk ]

Feedback

Gravatar

# re: Problem Enlisting Send Port

Thank you! You've just saved me a whole day of work!
2/11/2008 5:19 PM | ozzy
Gravatar

# re: Problem Enlisting Send Port

No problem, Invoice in the post :-)
2/11/2008 6:10 PM | Mike
Gravatar

# re: Problem Enlisting Send Port

Thanks! I ran into the exact same problem today.
2/15/2008 1:20 PM | Andy
Gravatar

# re: Problem Enlisting Send Port

I am still having the exact problem!

I was able to figure-out that the problem is because of the <Filter>. However, after importing the revised Binding files, somehow, it is adding junks to it. As, I was unable to enlist the send port, I exported the bindings (which I had applied after correcting the <filter>) and I found the following entry:

<Filter>
&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;Filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /&gt;
</Filter>

Any thought on this?
4/2/2008 8:55 PM | Truj
Gravatar

# re: Problem Enlisting Send Port

I just found the work around on that :-)

I added a dummy filter to the port and deleted it !!!

Still, I am not sure WHY binding file is adding a blank filter while importing it to BTS Admin console???
4/2/2008 9:17 PM | Truj
Gravatar

# re: Problem Enlisting Send Port

You saved me a lot of work. I copy-pasted the content of a backup binding file as I wrecked the one I was using at the time. Thank you.
4/16/2008 2:44 PM | Henrik
Gravatar

# re: Problem Enlisting Send Port

Great Post! It had the same problem!
Thanks!
Best wishes From Hamburg!
9/22/2008 11:27 AM | justMe
Gravatar

# re: Problem Enlisting Send Port

Great post! I had the same odd problem. Nice one.
9/30/2008 3:40 PM | Ed

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 2 and 1 and type the answer here:

Powered by: