posted on October 17, 2006 10:28 AM by Kurt

Can't publish orchestration as web service even though ports are Public

"But I swear my Two Way Ports are Public scoped"

Publishing an Orchestration as a Web Service: it's a common thing.  You create an orchestration; create a send-receive logical port; and try to expose via web-service.  Ah, but you forgot to make it Public scoped - by default it's Internal - no biggie.  Intuitively, per the error message you get ["There are no orchestrations with public receive ports in this BizTalk assembly.  Click back and specify a BizTalk assembly containing orchestrations with public receive ports."], you change the scope to Public and re-try the Publish Orchestration as Web Service.

But you still get the message that it's not public.

I have run into this a number of times, and I should be ashamed because I have listened to erroneous blog posts that tell you to re-write your project.  Normally, my projects are small enough that it doesn't matter.

But now, here's the canonical word on the subject - it comes via Marty Wazsnicky, Regional Program Manager at Microsoft and head of the Virtual TS program (which I am a part of).  Mix equal parts caffeine and BizTalk and you have Marty.  It's ashame he doesn't blog more often, because he's full of good information.

Anyway, to solve your problem Restart the BTSNTSVC.exe.  As Marty explains it, BizTalk 2006 uses .NET 2.0 caching for inspection of the Assembly that contains your newly public ports.  Thus, it never really inspects your new assembly and just relies on the old assembly (with Internal port scopes).  This is a dependency on the .NET CLR 2.0, so that's why this is a problem with BizTalk 2006 and not BizTalk 2004.

To sum up: Restart the service, the caching goes away and you can now create your service.

Thanks, Marty!

Comments

# re: Can't publish orchestration as web service even though ports are Public

November 14, 2006 5:12 AM by AHIT
Hi, I have tried to follow all the steps but I'm not able to create the web services from the Orchestration, please I need Help, I'm totally lost.

# re: Can't publish orchestration as web service even though ports are Public

November 14, 2006 7:47 AM by Antti Rauhala
Hello,

Restarting BTSNTSVC didn't work for me. I created a new signing key file, which did the job.

Antti

# re: Can't publish orchestration as web service even though ports are Public

November 28, 2006 2:10 PM by Abhishek
Restarting the biztalk service doesn't solve the problem.

Just like Anni mentioned above, changing the key to sign the assembly does. Wierd!!

regards,
Abhishek.

# re: Can't publish orchestration as web service even though ports are Public

November 30, 2006 9:32 AM by Jon Flanders
All you need to do is put the new version of the dll in the gac and restart the *WIZARD* - restarting BTSNTSVC.exe has no effect - since the wizard isn't using the host instance process (you can verify this by turning off the host process and running the wizard - it still works)