Friday, January 26, 2007

New Blog Site

I recently moved to a new blog site. My blog can now be found at

Please take a minute to update your RRS feed to

Come on over!

Friday, December 01, 2006

How to: Reference GAC'd assembly from VS2005

The other day I was trying to add a reference to an assembly that was in the Global Assembly Cache (GAC) from Visual Studio 2005. I couldn't find the assembly listed in the Add Reference dialog. I noticed that none of the GAC'd assemblies were showing up. So after a little research I found a way to add the reference. Go to the Browse tab and type the file path with assembly version and token in the File name: textbox. As an example, if you want to add a reference to the PIA interop assembly for Word 2003, you type:


Tuesday, November 14, 2006

K2.Net 2003 Server Evaluation Expired

A couple of weeks ago while developing a K2.Net 2003 workflow solution the application stopped working. My application kicked off a new process using Visual Studio 2005 web forms.

My web page had a submit button with the following code:
protected void Submit(object sender, EventArgs e)
// declare K2 variables
SourceCode.K2ROM.Connection k2Conn = new SourceCode.K2ROM.Connection();
SourceCode.K2ROM.ProcessInstance processInstance;

// instantiate K2 objects
processInstance = k2Conn.CreateProcessInstance("K2ProjectName\\K2ProcessName");

// map the data to the K2 process data fields
processInstance.DataFields["DataFieldName"].Value = textBox1.Text;

// start K2 process and close the connection

The following line threw the error:
processInstance = k2Conn.CreateProcessInstance( "

In the Event Log I found the following error:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2006-10-20 10:52:23
Event time (UTC): 2006-10-20 17:52:23
Event ID: 959c2128ccda4635a95e5206eca1bd1b
Event sequence: 13
Event occurrence: 2
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/Root/xxxxxxxxxx-8-128061853925301760
Trust level: Full
Application Virtual Path: /xxxxxxxxxxxx
Application Path: ...\Website\MyWebsiteMachine name: k2server

Process information:
Process ID: 3752
Process name: w3wp.exe
Account name: k2server\DEVsvcWssAppPool

Exception information:
Exception type: Exception
Exception message: Exception has been thrown by the target of an invocation.

Request information:
Request URL: http://k2server/.../MyPage.aspx
Request path: /.../MyPage.aspx

User host address:
Is authenticated: True
Authentication Type: NTLM
Thread account name: k2server\DEVsvcWssAppPool

Thread information:
Thread ID: 1
Thread account name: k2server\DEVsvcWssAppPool
Is impersonating: False
Stack trace: at Client.Throw(String s, Exception e)
at Client.InternalCall(UInt32 sock, ArchiveX ar, Int32 hdr)
at SourceCode.K2ROM.Connection.CreateProcessInstance(String ProcName, Int32 Version)
at SourceCode.K2ROM.Connection.CreateProcessInstance(String ProcName)
at IRWorkflow.IREnterNew.Submit(Object sender, EventArgs e) in ...\Website\MyWebsite\MyPage.aspx.cs:line 40
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Custom event details:

For more information, see Help and Support Center at

At first I thought that I had some sort of security/permission issue. After checking all the security/permission configuration I decided to start the K2.Net Console Server and try again. As the K2.Net Server started I noticed the following line in the console:

" Evaluation Version has expired on 20 Oct 06"

After contacting K2 and getting an extension on the evaluation version the error was resolved.

Tuesday, October 10, 2006

K2.Net Service Pack 4 Release

SourceCode released service pack 4 for their K2.Net 2003 workflow product around October 10th 2006. I spent some time looking for the list of enhancements and found them contained in the Bill of Materials (BOM) PDF file downloaded with the service pack. The following enhancements were made: Server
  1. An extensive Logging Framework that records and stores every Server event has been added. The log is stored in the [Drive]\Program Files\ 2003\Bin directory. Log settings are kept in the Logger.config configuration file.
  2. The Exception Messaging fomat has been altered to include the error number. Be aware that this can affect existing applications when installing the new service pack.
  3. Server Performance Monitoring has been added to assist system administrators manage server infrastructure and to detect bottle necks. The following counters were added:
    1. Processes
    2. Worklist Items
    3. Worklists
    4. Process Memory Usage
    5. Process Modules Loaded
    6. Process Thread Counts
    7. TCP Information
  4. Process migration tools allowing for the migration of processes accross servers. Studio
  1. Various bug fixes to the Code Editor and improvements including intellisense upgrades.
  2. Code access to write to the Logging Framework log file mentioned above, e.g. K2.ProcessInstance.Logger.LogDebugMessage("Event Name", "Message");
.Net Framework 2.0 Support
  1. An enhancement to the support provided by Service Pack 3. There are some Knowledge Base articles available to assist in setting up a .Net Framework 2.0 project:
    1. KB000152 - .NET Framework 2.0 design considerations and expected behavior
    2. KB000154 - Configuration for 2003 to run on a specific version of the .NET Framework
  2. Support for Visual Studio 2005. 2003 Tasklist WebPart
  1. Enhancements regarding the reference to the 2003 Server from Microsoft Share Point:
    1. Multiple 2003 Servers can be referenced - enter the server names with semi-colon delimeters.
    2. When referencing the server include the server name and port (default of 5252 will be used if a port has not been entered).
E.g. k2server1:1234;k2server2:4567;k2server3:5252

Look out for my next K2 post on using the Logging Framework.

Saturday, October 07, 2006

Microsoft SOA & Business Process Conference - Day 4

Day 4 at the conference and there are some bleary eyed attendees. While the conference has been great so far, I think people are tired and ready to go home. Today's presentations were all good in my opinion:

Aaron Skonnard, Cofounder, Pluralsight
Gruia Pitigoi-Aron, Microsoft
BizTalk Web Services: The Next Generation

Aaron pointed out that Service Orientation defines an architectural paradigm for software federation, with federation being the unification of self-governing entities.

  • SOA is focused on unifying autonomous services, providing architectural governance, reducing dependencies and minimizing assumptions.
  • SOA tenets help achieve loose coupling.
  • Benefits of SOA are :
    • Cost reductions, increased agility
    • Business & software alignment
    • Technology freedom
    • Independent evolution
    • Longer-term reuse
  • Web Services provide a way to implement the SO design principles:
    • XML reduces format complexities
    • WS-* reduces transport complexities
  • Web Services is not a silver bullet
    • Not everything can use XML, SOAP, WS-*
    • Can't throw away existing investments
    • Many web service stacks only support HTTP
  • SOA must plan for disagreement on the following fronts
    • Transport/application adapters
    • Message format translators
    • Message schema transformations
  • Combining BizTalk Server 2006 with web services provides the complete solution:
    • BTS fills various messaging integration gaps
    • BTS embraces we technologies
  • BTS 2006 R2 ship with WCF adapters
    • New adapters for each mainstream binding
    • A WCF-Custom adapter for extensibility
    • WCF Adapters use cases
      • Transaction message send/receive
      • Using WS-* headers for routing/processing
      • Using custom bindings (binding elements)
      • Numerous security scenarios
      • In-proc hosting of non-HTTP endpoints

Gruia then demonstrated using the WCF adapters to enable transactions and showed some security features using BizTalk Server, including single sign-on capability.

Aaron's final point was that BTS 2006 R2 will provide full WS-* support, custom bindings, flexible hosting & communications.

Aaron Skonnard, Cofounder, Pluralsight
Gruia Pitigoi-Aron, Microsoft
BizTalk WCF Adapters: In-Depth

In this session Aaron and Gruia continued showing demos of the new WCF Adapters. There were no slides only the a dive into some real code (I found this refreshing).

The first demonstration showed a client sending a message to BTS through a web service with option to select separate XML versions for the message structure. BizTalk then routed the message to separate versions of the backend application. Version 1 used transport security (which resulted in a smaller message) and version 2 used message security. The BizTalk receive location was a WCF-NetTcp adapter using a custom pipeline to add a custom header to the message header that contains the version (it can also look for differences in actions, namespace, etc). The pipeline promotes the value (needs a property schema), the send port filters on the custom operation and then routes it to the service depending on the version number. It provided a model for versioning using web services.

The second demonstration showed how to build a custom WCF adapter. The binding tab on the adapter allows to pick different binding types (you can install other bindings or even create a custom binding element).

Don Smith, Product Manager, Patterns & Practices, Microsoft
Web Services Software Factory

Don started by speaking about how software factories help you build a specific kind of application (smart client, service, etc). He then went on to speak about the Software Factory that can be downloaded from the Patterns and Practices website. He mentioned that the software factory incorporates a variety of guidance content types and form factors:

  • Architecture & design guidance, patterns, and how-to's (readable/printable)
  • Reference implementations (executable) - sample applications
  • Application blocks (reusable)
  • Guidance packages (actionable)

Guidance packages provided are:

  • Open - documentation describes manual and automated tasks, the result of the automation is exposed
  • Configurable - key configuration settings can be captured within Visual Studios, automated guidance is defined using XML
  • Extensible - guidance can be tailored to meet specific requirements
  • Verifiable - generated code can be verified for compliance within a standard

Don demonstrated the Software Factory by setting up a wine rating service for a winery.

The benefits of using the factory are:

  • Increased quality
  • Better consistency of projects/services
  • Better performance of developer

According to Don the next version of the Software Factory with WCF support is set to be released in December 2006. It will include:

  • Versioning
  • ASMX/WCF Interop
  • WF
  • Message validation
  • Security

Blog: Don Smith
Patterns & Practices
Web Service Software Factory
Service Factory Community Workspace
The LINQ Project

Friday, October 06, 2006

Microsoft SOA & Business Process Conference - Day 3

It's day 3 at the conference and the presentations were good, especially the one by Chandramouli Venkatesh on the Biztalk Server 2006 R2 Adapter Framework. It provided some interesting insight into the upcoming release slated for the 1st quarter of 2007. It was mentioned that beta 1 should be out by the end of the year.

Paul Andrew, Senior Product Manager, Microsoft
Windows Workflow Foundation: Creating Custom Activities for Workflows

The level of the presentation was at an introductory level, covering topics from “What is workflow” to speaking about workflow runtime, and the Base Activity Library (BAL). I’ve listed some points that Paul mentioned:

  • A workflow is a software implementation of business process or business logic.
  • Workflows are transparent, flexible and extensible.
  • WF is not for end users or business people but for developers. It does not have any administration tools or a reporting interface and provides no direct business value without development.
  • WF is a framework for building workflow-enabled applications.
  • Workflows are modeled as a tree of activities.
  • Custom application logic should be modeled using activities
    Activities are all of the steps within a workflow or reusable components for composing workflows. He had a good analogy where he compared workflows to UI forms and controls, where Workflows are like Forms and Activities like Controls.
  • Build custom activities when they are composite activities (multiple basic activities merged into one activity), it is anticipated that they will be reused or there is a high level of business logic within one

The demo was a simple console workflow that showed how to build custom activities. Paul added a Validator and a Designer to the activity. What I had not seen before was the effect of the designer which changed the way that the workflow was presented in the Visual Studio workflow designer. It is a great way to develop a set of activities that are going to be used by your organization and providing a different look for them. In fact you can go as far as categorizing activities by their function and giving a different look to each one, similar to the way that functoids are colour coded in BizTalk. Different information can be added to the activity as well.

Blog: Paul Andrew

Eilene Hao, Program Manager, Office Shared Services, Microsoft
Windows Workflow Foundation: Developing Office 2007 Workflows in Visual Studio 2005

Eilene’s presentation was mostly a walkthrough demonstration of how to build a workflow for SharePoint using Visual Studio and InfoPath 2007.

Recommended downloads for developing workflows:

The five steps used to build these workflows are:

  1. Model workflow in Visual Studio
  2. Design InfoPath forms
  3. Bind form data & code logic
  4. Deploy the workflow
  5. Debug on running server

Her development recommendation was that to develop on the server, either virtual machine environment or on an actual server box.

Steve Swartz, Architect, Connected Systems Division, Microsoft
Clemens Vasters, Program Manager, Connected Systems Division, Microsoft

This was the least beneficial presentation that I have attended so far. This is by no means a reference on the presentation or the presenters; in fact they managed to keep me interested even though I am in not interested in presentation much. That being said, my notes are frugal at best. They spoke mostly about design patterns for rich clients, and covered the following patterns in more detail:

There main objectives for the presentation were:

  • Connected client technologies open opportunities
  • Have more options that you probably take advantage of
  • Choose the right option for each task

Chandramouli Venkatesh, Group Manager, Connected Systems Division, Microsoft
BizTalk Server 2006 R2 Adapter Framework - Walkthrough

This was, in my opinion, the best presentation yet. Chandramouli provided a walkthrough of the Adapter Framework (AF). The main points were that there is no unified adapter development framework for .Net and that adapters today are built to be specific to each of the consuming hosts like BTS, MIIS.

The goal of the AF is to enable easy development of high quality, metadata driven, host-agnostic, custom adpapters to LOBs. The idea is for them to extend WCF and to make the adapters consumption exactly same as other WCF adapters.

The benefits will be that it will:

  • Enable reaching multiple programming models e.g., WCF channel, etc.
  • Enable exposing a web service face to the system being adapted automatically (via adapter host)
  • WCF channel architecture extensibility points enable easy customization of adapter behaviors
  • Development tools

Chandramouli went on to demonstrate using the SAP adapter from Visual Studio 2005 and from a BizTalk Orchestration. He also demonstrated using the “.Net 3.0 Adapter Development Wizard” to develop a custom adapter. Note: he mentioned that the wizard name may still change prior to release.

Wednesday, October 04, 2006

Microsoft SOA & Business Process Conference - Day 2

Today is day 2 of the conference, which turned out to be better than yesterday. The presentations were great from my point of view. I attended the following four presentations:

Craig McMurty, Technical Evangelist, Developer & Platform Evangelism, Microsoft
Windows Communication Foundation: Extensibility in the WCF Service Oriented Development Platform

Craig's presentation was the best of the day in my opinion. He made the point that WCF is a Software Factory for Communication. He went on to explain the WCF messaging process listing the following activities which can be customized:

  • WSDL exporter
  • Parameter Inspector
  • Message Formatter
  • Message Inspector
  • Encoders
  • Channels
  • Dispatcher
  • Message Inspector
  • Operation Selector
  • Message Formater
  • Parameter Inspector
  • Operation Invoker

He went to demonstrate developing a custom Message Formatter and Channel.

Steve Swartz, Architect, Connected Systems Division, Microsoft
Clemens Vasters, Program Manager, Connected Systems Division, Microsoft
Connected Systems on Windows: An Introduction

This presentation was a historic look of the evolution of the application server products starting in 1996 with the release of the following products: Windows NT, Microsoft Transaction Server 1.0, ASP 1.0, InterDev 1.0, Visual C++ 5.0, Visual J++ 1.0, Visual Basic 5.0, IIS 3.0, SNA Server 3.0, ADO 1.0, VBScript.

Clemens did a short demonstration of MTS & IIS 3.0.

The presentation went on to address the following topics:

  • The Client/Server Wave, followed by the N-Tier Wave to the current Federated Systems Wave (SOA).
  • Application Services Evolution (MTS, COM+, Enterprise Services and WCF)
  • Communication Technologies Evolution
  • Security & Identity Services Evolution (Workgroup, Enterprise, Customers & Partners)

This was followed by brief introductions of Windows CardSpace and WF.

Lee Graber, Developer Lead, BizTalk Core Engine, Microsoft
Advanced Routing & Correlation with BizTalk Orchestrations

Lee gave a 400 level presentation on the covering:

  • BizTalk Server Messages and their
  • Data Storage Model
  • Activating Subscriptions vs Correlating Subscriptions
  • Correlation choices
  • Convoys

After demonstrating a Resequencer Pattern he went on to discuss Zombies (suspended non-resumable instances with reasons "Completed with discarded messages") and how they are usually generated.

Lee provided the following links as BizTalk resources:

Steve Swartz, Architect, Connected Systems Division, Microsoft
Clemens Vasters, Program Manager, Connected Systems Division, Microsoft
Connected Systems On Windows - Logic, Rules, and Workflows

The main topic of the presentation was interconnected architectural patterns that can be used to develop application solutions:

  • Direct connection pattern or also know as N-Tier which is has direct method calls and is highly coupled.
  • Indirect connection pattern which has firm decoupling and can have reliable messaging through thread transaction, and example being queues.
  • One to many/end to end/subscription pattern which is flexible about number of entities that respond to an event and is the least coupled.

Steve went on to mention that the strategy is to have WCF support all types of patterns and that they there can be a composition of all patterns within applications if needed.
The example mentioned being Outlook:

  • Contacts, Notes (n-tier)
  • Outbox, Task (queue)
  • Inbox, Reminders (pub/sub)

The other main topic discussed was the move from imperative code to declarative code. The main reason being abstraction and moving logic into configurable metadata makes systems more agile and easier to adjust to changing needs.

There'll be more to come tomorrow...