Demystifying Direct Bound Ports – Part 3

Partner Direct Bound Ports


Partner direct bound ports provide the capability of having inter-orchestration communication via ports. 


To configure a partner direct bound port you must choose the orchestration and port for the ’Partner Orchestration Port’ property.  When configuring the two partner ports you must have one side select the orchestration.port it will communicate with and the other side will select its own orchestration.port.  This is a little non-intuitive but will be explained in the sections below.  Also the port types for both ports must be the same, which implies that the message-types must also be the same.  This is one of the places where the Type Modifier property on the port-type matters.  To be able to direct bind to a partner port the port-type type modifier must either be internal for orchestrations within the same assembly or public to allow an orchestration from another assembly to bind to it.  Finally, the polarities of the ports must be opposite.  In other words, if one side is a send port then the other side must be a receive port.


There are two communication patterns that can be created; forward partner direct binding and inverse partner direct binding.  These two patterns provide explicit inter-orchestration communication.  By explicit I mean that there is an intended recipient orchestration (forward partner direct binding) or an intended sender (inverse partner direct binding).  You can design implicit partner direct binding by having either the receiver be message box direct bound and create a filter that will accept messages from a particular sending orchestration or have the sender be message box direct bound and promote properties that will match a subscription on the receiving orchestration.


Forward Partner Direct Binding


This is the typical communication pattern that is used for partner direct binding.  Orchestration A has a partner direct bound send port that will send a message to Orchestration B on its partner direct bound receive port.  To configure this forward partner direct binding you must have orchestrationA.sendPort1, which is of type portType1, select orchestrationB.receivePort1, which is also of type portType1, as its Partner Orchestration Port.  orchestrationB.receivePort1 will select itself, orchestrationB.receivePort1, as its Partner Orchestration Port. 



Figure 6 Forward Partner Direct Binding Configuration


 


On the sender’s side what this says is, “I will send messages to orchestrationB.receivePort1” and on the receiver’s side it says, “I will receive any messages sent directly to my receivePort1”. 


Under the covers when messages are sent out of sendPort1 the orchestration engine will set the following properties:


BTS.Operation to the operation on the port being used.


BTS.PartnerPort to the name of the partner direct bound port configured in the Partner Orchestration Port property


BTS.PartnerService to the strong name of the orchestration referenced in the Partner Orchestration Port property


 


Note: the strong name of the partner service will usually look something like:


OrchNamespace.OrchTypeName, AssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fedcba9876543210


 


On the receive side the subscription will be (for brevity I will use the BTS namespace instead of http://schemas.microsoft.com/BizTalk/2003/system-properties as you would see in the actual subscription)


BTS.Operation == operation1 And


BTS.PartnerPort == receivePort1 And


BTS.PartnerService == MyTest.OrchestrationB, MyTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fedcba9876543210 And


BTS.MessageType == http://MyNamespace#MyRootNodeTypeName


 


Something to note here is that there is a strong binding from the sender orchestration to the receiver orchestration.  By strong binding I mean that the sender orchestration is referencing the receiver’s strong name as its partner service.  What this means is that if you want to change the receiver’s side or if you change the version of the receiver’s side you must update the design time configuration of the sender’s port.  But the receiver has no explicit knowledge of the sender so the senders’ orchestrations can be updated without affecting the receiver.


This type of forward binding allows you to have multiple senders bound to the same recipient. 


 



Figure 7 N:1 communication


 


Here orchestrationD would be doing some common asynchronous work needed by many different orchestrations.


Inverse Partner Direct Binding


This is not the typical communication pattern that is used for partner direct binding as the direction of binding is inverse of its direction of communication.  Orchestration A has a partner direct bound send port will send a message to Orchestration B on its partner direct bound receive port.  To configure this inverse partner direct binding you must have orchestrationB.receivePort1, which is of type portType1, select orchestrationA.sendPort1, which is also of type portType1, as its Partner Orchestration Port.  orchestrationA.sendPort1 will select itself, orchestrationA.sendPort1, as its Partner Orchestration Port. 



Figure 8 Inverse Direct Binding Configuration


 


On the sender’s side what this says is, “I will send a message to anyone who is listening for messages from my send port” and on the receiver’s side it says, “I will receive messages sent from orchestrationA.sendPort1”.


Under the covers when messages are sent out of sendPort1 the logic for setting properties is still the same as it was for the forward case.  The orchestration engine will still set the following properties:


BTS.Operation to the operation on the port being used.


BTS.PartnerPort to the name of the partner direct bound port configured in the Partner Orchestration Port property


BTS.PartnerService to the strong name of the orchestration referenced in the Partner Orchestration Port property


On the receive side the subscription will


BTS.Operation == operation1 And


BTS.PartnerPort == sendPort1 And


BTS.PartnerService == MyTest.OrchestrationA, MyTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fedcba9876543210 And


BTS.MessageType == http://MyNamespace#MyRootNodeTypeName


 


In this case the receiver is strongly bound to the sender implying that if you want to change the receiver’s orchestration or update the version then you must update the sender’s port configuration.  The sender has no explicit knowledge of the receiver so the receivers’ orchestrations can be updated without affect the sender.


This type of inverse binding allows you to have a single sender communicate with multiple receivers.


 



Figure 9 1:N communication


 


Inverse direct bound ports allows for a recipient list pattern.  The recipient list is determined by which receive ports are bound to a particular send port and is maintained as part of the orchestration design.  Here either all of the recipient orchestrations can consume any message coming from the send port or they can each have a filter to determine which messages each of the recipients should consume from the sender. 


One thing to be careful about is that if you are using a two-way port type with inverse partner direct binding then you must setup your filters to ensure that only one of the recipients will consume (i.e. subscription will match) the message.  This is because a solicit-response port is expecting a single response and if multiple recipients get the message, then it will accept the first response and all subsequent responses would be suspended non-resumable.  The engine won’t let that happen and it will instead throw an exception when you try to send the message indicating that there would be multiple recipients for a solicit-response request.

Speaking at UNUG on BizTalk Server 2006

The next thing on my agenda is a local UNUG (Utah .NET User’s Group) talk, which will take place tomorrow night in South Jordan (Neumont). I’m going to speak on BizTalk Server 2006 — one of my favorite topics these days. I’m going to focus primarily on its messaging layer and integration features.
If you’re here in Utah and not at TechEd, hopefully we’ll see you tomorrow night. My TechEd 2006 visit was shortened this year by my daughter’s yearly ballet recital, which trumps all things technical.

Important guidance for development

Of recent I’ve been reminded for how uncommon “Common
Sense” truly is.  To that end, I submit a list of rules which every company engaged
in software development should adopt.
 
Titles Should Be Meaningless
Far to often titles are used in modern Corporate America to give an inflated
view of importance or responsibility.  What someone’s title in an organization
is should be meaningless.  What should be important is what value they bring
to the organization.
 
Team Cohesiveness Should Rule
A team should be composed of people who respect one another’s opinions and
contributions.  Far to often I’ve seen a team dragged through the mud by one
person’s whose attitude towards the work has become bitter.  These people are
poison to everyone around them.  With understanding to personal life issues,
they should be moved away from the team until they can return with a positive attitude
towards the work.
 
Teams Should Be Dynamic
A team should consist of those needed to perform the work at the moment.
If someone is not necessary for this phase of a project, then they shouldn’t be on
the team until they are needed.  Hording talented resources makes them bored. 
Bored talented people get employed by your competitors.
 
Cut Down Bureacracy
Managers should exist to cut through red-tape, not create it.  If your
job is to manage development resources you should spend most of your time each day
allowing them to be creative and solve problems.  Your team should feel comfortable
calling you with the smallest concerns and knowing you will get things done in a timely
manner.  Your a member of the team to.
 
Be Honest And Keep Your Promises
Try to straight forward in all your communications.  If there is change
coming, tell people as soon as you can.  Make certain that you avoid obfuscation
whenever possible.  The more open communications are, the more powerful the organization
will be because little known talents can be taken advantage of. <!–
D(["mb","

\n

\n

Consistantly Reward Performance
Even the most \ntalent people need motivations to keep going and giving their best. Look \nfor oppurtunities to reward excellence outside of a paycheck. Budget for \nsuch things as needed, but make them spontaneous as you can.

\n

\n

Keep Talent And Cut Chaff
Talented people in \ndevelopment are creative, outside of the box thinkers. These people thrive \nwhen you gather many of them in the same place. You need only look at the \noutput of Xerox\’s famed Palo Alto Research Center (XEROX PARC) to know that a \ngroup of talented creative people can change the world, not just an organization \nprovided that management believes in them. Likewise people who aren\’t \nproducing are a drain on such creativity. You\’ll get more done with 10 \ntalented people than you will with 10 talented people and 10 \nunder-producers.

\n

\n

Focus On Small Problems
Attempting to solve "Big \nProblems" in a single large project has been the doom of almost every project \nthat has tried it. Focus on small solutions that build towards a solving \nbig problems. This path may seem to have many hills and valleys and be \nless grandeous, but the highway of large projects is littered with failed \ndeliverables and maintenance nightmares just out of sight over the \nhorizon.

\n

\n

Expect Excellence
It is important to have high \nexpectations of your people, but it is doom to expect the impossible. It \nis key that you speak with your first layer of leadership, not necessarily \nmanagement, on a regular basis about the reality of your goals. They \nshould feel free to tell you when what being asked is simply not possible. \nCreative and talented people will consistantly rise to meet the challenge which \nis difficult, but they will just as consistantly shut down and stop performing \nwhen asked to perform the impossible.”,1]
);

//–>

 
Consistantly Reward Performance
Even the most talent people need motivations to keep going and giving their
best.  Look for oppurtunities to reward excellence outside of a paycheck. 
Budget for such things as needed, but make them spontaneous as you can.
 
Keep Talent And Cut Chaff
Talented people in development are creative, outside of the box thinkers. 
These people thrive when you gather many of them in the same place.  You need
only look at the output of Xerox’s famed Palo Alto Research Center (XEROX PARC) to
know that a group of talented creative people can change the world, not just an organization
provided that management believes in them.  Likewise people who aren’t producing
are a drain on such creativity.  You’ll get more done with 10 talented people
than you will with 10 talented people and 10 under-producers.
 
Focus On Small Problems
Attempting to solve “Big Problems” in a single large project has been the
doom of almost every project that has tried it.  Focus on small solutions that
build towards a solving big problems.  This path may seem to have many hills
and valleys and be less grandeous, but the highway of large projects is littered with
failed deliverables and maintenance nightmares just out of sight over the horizon.
 
Expect Excellence
It is important to have high expectations of your people, but it is doom
to expect the impossible.  It is key that you speak with your first layer of
leadership, not necessarily management, on a regular basis about the reality of your
goals.  They should feel free to tell you when what being asked is simply not
possible.  Creative and talented people will consistantly rise to meet the challenge
which is difficult, but they will just as consistantly shut down and stop performing
when asked to perform the impossible. <!–
D(["mb","

\n

\n

Strive To Humanize
This runs contrary to so much \nof what is out there today about management, but it is vitally important that \nmanagement over development efforts deliberately humanize themselves to their \nteam on a regular basis. Have lunch out with your team on a regular basis, \ntalk about the things which people talk about at lunch. Remember that \n"Titles Should Be Meaningless" and strive to reinforce that YOU know they are \nwith your team.

\n

\n

Trust Your People
Perhaps the most important \nrule of all of these, trust your people. Developers are writing code which \nwill be deployed into the most fragile places in your enterprise. These \nmen and women write programs for a living, they create solutions from \nnothing. Give them the environment necessary to be creative and you will \nget excellence. This goes from the physical environments (personalized \nwork spaces comfortable to that person) to the technical environments (rights \nsufficient to install and try new software). Far to often developers are \nplaced in small, unpersonalized cubicles in the dark corner of the office \ncomplex and saddled with authoritarian policies regarding the installation of \nsoftware. Creative environments create creative results.

\n

\n

Tim Rayburn

\n

Originations

\n

CitiFinancial Auto

\n

469-220-5817- Office

\n

817-300-9788 – Cellphone

\n

\n\n

“,0]
);

//–>

 
Strive To Humanize
This runs contrary to so much of what is out there today about management,
but it is vitally important that management over development efforts deliberately
humanize themselves to their team on a regular basis.  Have lunch out with your
team on a regular basis, talk about the things which people talk about at lunch. 
Remember that “Titles Should Be Meaningless” and strive to reinforce that YOU know
they are with your team.
 
Trust Your People
Perhaps the most important rule of all of these, trust your people. 
Developers are writing code which will be deployed into the most fragile places in
your enterprise.  These men and women write programs for a living, they create
solutions from nothing.  Give them the environment necessary to be creative and
you will get excellence.  This goes from the physical environments (personalized
work spaces comfortable to that person) to the technical environments (rights sufficient
to install and try new software).  Far to often developers are placed in small,
unpersonalized cubicles in the dark corner of the office complex and saddled with
authoritarian policies regarding the installation of software.  Creative environments
create creative results.
YASR: Alerts in SharePoint 2007

YASR: Alerts in SharePoint 2007

One of the more popular quirk in SharePoint 2003 (remember the YASQ’s?) was the alerting mechanism. The alerts in SharePoint 2003 are OK at first sight: you can create an alert for a complete list or document library, or just for one item. The problem is that you can only create an alert for yourself. This makes sense if you think of alerts as ’RSS-avant-la-lettre’. But lots of people would like to create alerts for other users as well. Unfortunately this was not available out-of-the-box, although you could customize SharePoint by installing various (free) web parts to overcome this issue.


Recently I discovered that this YASQ has become a YASR (Yet Another SharePoint Relief): in SharePoint 2007 you can create alerts for other users! Just navigate to a list or document library, and from the Actions menu choose the Alert Me item.



On the New Alert page you can specify the details about the alert: title, type and destination. The new (and exciting) thing is here that you can enter multiple user accounts to which the alert should be sent.



Further down on the page there are more innovations. In SharePoint 2007 you can create an alert which is based on a specific view which opens quite some interesting possibilities. Finally you can still choose the interval to sent the alert (immediate, daily and weekly). New here is when you select the daily or weekly summary that you can specify the exact time when the alert should be sent (e.g. a daily summary at 7.00 am in the morning).



So are alerts perfect in the release? I think there’s still some room for improvements: when you create an alert for multiple users actually multiple alerts are created. This is a disadvantage when you would like to delete or update the alert that you’ve created for multiple users at the same time (you can’t push forward those changes). And finally it’s not (yet?) possible to create an alert for all the content of a site. But don’t get me wrong, I still consider this as a major YASR!

Share this post: Email it! | bookmark it! | digg it! | reddit!

TechEd 2006 Precon Demos

TechEd 2006 is here. I delivered a pre-conference seminar on Building .NET Web Services Today with.NET 2.0 and WSE 3.0.You can get the demos here, which may not make much sense unless you were there.
I was somewhat surprised by one of my informal surveys, which showed that a much higher percentage of the attendees are actually using Web services in production today. Many of them are taking advantage of ASMX and WSE with great success, solving real problems with today’s technologies. Refreshing.

Impersonation and authentication with ASP.Net

The task: make a web user authenticated (either with him directly providing user ID or password or through domain, if he is already logged in) and run ASP.Net code under his/her ID.


 


Frankly, that’s very easy, but I noticed that sometimes even very good developers don’t know how to do that. In short, impersonation element in web.config does the trick. If you know the rest, that’s it, you don’t need the rest of this post.


 


Otherwise, let’s just go through the process. First, go to your IIS folder, usually C:\Inetpub\wwwroot, and create a folder for your application/webservice, say C:\Inetpub\wwwroot\Hello. You can do that in Windows Explorer. I will show an example with webservice,


 


In this folder you will need two files: web.config and Hello.asmx (assuming you want to call your webservice Hello).


 


Simple web.config looks like that:


 


<?xml version=”1.0″?>


<configuration xmlns=”http://schemas.microsoft.com/.NetConfiguration/v2.0″>


            <appSettings/>


            <connectionStrings/>


            <system.web>


                        <customErrors mode=”Off” />


                        <compilation debug=”true” defaultLanguage=”c#” />


            </system.web>


</configuration>


 


I have added debugging and set default language to C#, but that’s optional. Hello.asmx file is very simple:


 


<%@ WebService Language=”C#” CodeBehind=”~/App_Code/Hello.cs” Class=”Hello” %>


 


Now, create a folder App_Code (C:\Inetpub\wwwroot\Hello\App_Code), that’s where the actual code traditionally lives, and create Hello.cs file, already referenced in Hello.asmx:


 


using System;


using System.Web;


using System.Web.Services;


using System.Web.Services.Protocols;


 


[WebService(Namespace = “http://hellomedear.org/test/namespace/”)]


[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]


public class Hello : System.Web.Services.WebService


{


    public Hello () {


    }


 


    [WebMethod]


    public string HelloMeDear()


    {


        return “Hello, ” + System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString() + “!”;


    }


}


 


This way it will return back the name of the current user, so we can track our progress. So, are we ready? Let’s try. Enter address http://yourmachine/hellome/hello.asmx in the browser. Oops… Error:


Server Error in ‘/’ Application.


Parser Error


Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not create type ‘Hello’.

Source Error:





 
Line 1:  <%@ WebService Language=”C#” CodeBehind=”~/App_Code/Hello.cs” Class=”Hello” %>


Source File: /hellome/hello.asmx    Line: 1






Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42


 


Why? You forgot to tell IIS that there will be ASP.Net code in this folder. Go to Control Panel | Administrative Tools | Internet Information Services, then select default web site, open it and you’ll see your folder shown with a folder icon. Right-click on it, select Properties, and click on “Create” button near the grayed textbox Application name. The click OK, and the icon will become something mechanical. That’s what you want.


 


Try again. Now you should get the list of available methods, which in our case is simply HelloMeDear. Click on it, and if you do that from the same machine, you will see a button Invoke, which let’s you try the method.


 


Click on it. A new windows will open with the result:


 


<?xml version=”1.0″ encoding=”utf-8″ ?>


<string xmlns=”http://hellomedear.org/test/namespace/“>Hello, NT AUTHORITY\NETWORK SERVICE!</string>


 


That’s nice, but NT AUTHORITY\NETWORK SERVICE is not your ID. What happened?


 


Go again into properties of your folder in IIS management, pick Directory Security tab, and press Edit for Authentication and access control. See “Enable anonymous access” checked? That’s the problem. Even if you’ll get impersonation, it will be that automatic user marked in the textboxes next to it. Actually, let’s try it.


 


Go to your folder and open web.config file. First add


                        <identity impersonate=”true” />


into <system.web> element. Try again:


 


<?xml version=”1.0″ encoding=”utf-8″ ?>


<string xmlns=”http://hellomedear.org/test/namespace/“>Hello, YOURMACHINE\IUSR_ YOURMACHINE!</string>


 


You’ve got that impersonated user. To avoid that, go again into IIS configuration for your folder, Directory Security, edit Authentication and access control, and uncheck Enable anonymous access, plus check checkbox Integrated Windows authentication. Try now:


 


<?xml version=”1.0″ encoding=”utf-8″ ?>


<string xmlns=”http://hellomedear.org/test/namespace/“>Hello, YOURMACHINE\yourID!</string>


 


You’ve got it! Actually, it’s nice to add also:


 


                        <authentication mode=”Windows”/>


 


into your web.config file along with impersonation element. That’s it.


 


So, all steps in a short list:



  1. Create IIS folder

  2. Create web.config file (see below to get important element)

  3. Create .asmx file (see above)

  4. Create App_Code subfolder and create there .cs file (see above)

  5. Go to Control Panel | Administrative Tools | Internet Information Services, open, select default website, select your folder under it, right click, Properties.

  6. Create application (button on the left of Application name:)

  7. Go to Directory Security tab, click on Edit for Authentication and access control

  8. Uncheck Anonymous access, check Integrated Windows authentication

  9. You are done. To try go to http://yourserver/hellome/hello.asmx

 

EDI Subsystem Error 120

Source: EDI Subsystem
Category: BizTalk Server 2006
Error encountered: ERROR (120) :
An error occurred in the File System connector. Check the details.Cant make a connection to
 
\\MyComputer\EDIDocsHome\Documents\PickupEDI. Errormessage: The operation cannot be performed because a network component is not started or because a specified name cannot be used.


Check the Security Setting for the file share “\\MyComputer\EDIDocsHome\Documents\PickupEDI”


Make sure “EDI Subsystem Users” group has Full Control to the share.

By default, it is located @ C:\Documents and Settings\All Users\Application Data\Microsoft\BizTalk Server 2006\EDI\SubSystem

TechED Keynote

The Key note was given by Ray Ozzie, CTO of Microsoft. Major focus of his speech was on getting software that are “People Ready” with Office 2007 based products. The new buzz is about Client-Server Service Synergy, which is how the current systems get transformed from traditional Client/Server systems to Service based systems.


Microsoft also made four promises for future with the key note


1. Manage Complexity
2. Secure Anywhere
3. Advance Business with IT Solutions
4. Amplify the Impact of People


To illustrate the above, there were 4 videos following the “24”drama format (Choloe O’Brien) and it was pretty humorous. There is also a new product that is going to be released for securing client systems called Microsoft ForeFront. Forefront is designed for organizational level management of network and machine security. There were also some cool demos on Windows Server virtualization on how dynamically Virtual machines in future can be managed.


Also the announcement of development portal for windows live (http://dev.live.com) was announced.

Creation of Adapter MSMQ Configuration Store entries failed: Access is Denied

A previous client of mine ran into this problem while installing the MSMQ adapter during a production push.  They were logged into the server using a Host instance login, which happened to be a local administrator.


The minimum security requirements for adding an adapter is that the user has to be in two BizTalk Server domain groups, the BizTalk Server Administrator and the SSO Affiliate Administrators groups.


In this case, the user was not in the SSO Affiliate Administrators group.  Logging in as a user that is in both of the aforementioned groups resolved the issue.