Michael Stephenson

Microsoft BPM/SOA Adventures
posts - 187, comments - 182, trackbacks - 15

My Links

News

View Michael Stephenson's profile on BizTalk Blog Doc 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
Gravatar

# re: Problem Enlisting Send Port

Mike,
Thanks for the blog post - saved me a lot of time.

I did however have the same problem as Truj above in that I had a <Filter> element with an empty filter that was still causing problems:

<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>

BizTalk still didn't want to start the Send Port with this configuration in the Binding File... Given that the encoded Xml defines an empty filter, I simply changed the upper-level Filter element to an empty element and this resolved the problem:

<Filter />

Cheers, Nick.
1/9/2009 1:58 PM | Nick Heppleston
Gravatar

# re: Problem Enlisting Send Port

Michael,

Thanks man !! I would have spent days to figure out this on my own. Your workaround fixed my problem in a jiffy :)
2/10/2009 5:50 AM | ND
Gravatar

# re: Problem Enlisting Send Port

Dude,
You saved my bacon too. This is such a weird error. If the filter is wrong i would expect it to not even import the send port.

cheers
benjy
4/28/2009 7:59 PM | benjy
Gravatar

# re: Problem Enlisting Send Port

You saved me a second time - I should really start to remember what HRESULT: 0xC00CE557 means.... I owe you a beer next time I see you ;-)

Nick.
5/26/2009 3:24 PM | Nick Heppleston
Gravatar

# re: Problem Enlisting Send Port

Well done, you saved my time! I have seen that additional lines were put by visual studio when editing bindings file, but I didn't thought this could lead to such error.
Thanks a lot!
6/9/2009 10:52 AM | Etienne
Gravatar

# re: Problem Enlisting Send Port

Excellent tip, thanks

Nick
6/12/2009 11:17 AM | Nick
Gravatar

# re: Problem Enlisting Send Port

Excellent!

I used the work around of Truj (add a dummy filter to the port and deleted it) and it worked like a charm...

Thank you
8/26/2009 5:27 AM | Arbiorix
Gravatar

# re: Problem Enlisting Send Port

Thank you
You saved my whole night
10/28/2009 6:42 PM | Kishore Dogiparti
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 

Powered by: