Windows SDK for .NET Framework 3.0 RC1 is out!

Like many of you, I was very anxious to try out the .NET 3.0 Release Candidate bits (click here to download). However, for some reason I had trouble installing the bits. After many unsuccessful attempts, I finally decided to read the readme file (Yes, I do occasionally stop and ask for directions). I disabled my virus scanner as suggested by the readme file and sure enough, the installer finished without a complaint.

If you install the framework, you’ll also want to install these…

…(read more)

Cheap Tricks with the Business Rule Engine

The "immutable" nature of Policies and Vocabularies tends to clash with the development cycle of design-develop-test-debug.

First, from a webcast from Microsoft plus some of my own tweaking, here’s the SQL to toggle the Published status of a Policy

UPDATE re_ruleset

SET nStatus = nStatus ^ 1

WHERE strName = ‘
policyName
AND nMajor =
majorVersionNumber

AND nMinor = minorVersionNumber

The same for toggling a Vocabulary:

UPDATE re_vocabulary

SET nStatus = nStatus ^ 1

WHERE strName = ‘
vocabularyName

AND nMajor =
majorVersionNumber

AND nMinor = minorVersionNumber

The last trick is to note how Import and Export work. You can Export a Policy (or Vocabulary), but if you try to Import it again on the same machine, you will get an error. If you delete the Policy, you can now Import it. (As noted on the Wizard, policies and vocabularies are always imported in a Published state.)

I’ve published and deployed a policy, built an orchestration that calls that policy (using the rules shape), exported the policy to a file, imported it on another system, made changes, and reversed the process (export, import, deploy). The orchestration called the new rules just fine.

I wouldn’t recommend it on a production system, of course.

Resize a Virtual Hard Drive

I took the advice that came from this post and tweaked it a bit.

A few key assumptions:


  • Your virtual is running Windows 2000 or 2003. This will probably work under XP. If you’re running anything else, you’ll probably have to create a new virtual machine temporarily as a “host” for your drives.
  • You have enough free virtual disk slots in your configuration. If not, (again) create a temporary host.
  • You have enough real disk space to hold your old virtual disk, plus a copy, and your new (larger) virtual disk.
  • You have access to the Resource Kit for your OS and it contains ROBOCOPY
  • You know where the VHDs are stored on your physical drive.

If you’re not trying to resize the VHD you’re booting from, you can skip this first part.



Assume you’re booting from SMALL.VHD.

Make a copy and rename: SMALL2.VHD.

Use the Web Admin tool to register SMALL2.VHD.

Use the Web Admin tool to create LARGE.VHD of the new size.

Use the Web Admin tool to add SMALL2.VHD and LARGE.VHD as disks on your virtual machine.

If you’re not booting from SMALL.VHD, you only need to create LARGE.VHD and add it as a disk.

Boot Windows.

Load up Disk Manager (Start | [Control Panel] | Administrative Tools | Computer Management | Disk Management)

Partition and format your large drive.

If you’re booting from SMALL, right-click the newly-formatted, larger drive and click “Mark As Active”

Run ROBOCOPY [Old]:\*.* [New]:\*.* /MIR /SEC /R:3 (The /R:3 got me over a file that the OS had locked. It didn’t affect the results.)

Shut down your virtual machine.

Use the Web Admin tool to remove the two smaller drives.

Biztalk Custom Pipeline Component Development Tip

Pipelines are implemented in a BizTalk 2004/2006 project for a variety of reasons, including encryption/decryption, splitting single XML documents into multiple documents, and converting flat files into XML documents etc. For doing above mentioned tasks we’ll be using Pipeline components (which gets deployed in different stages of a pipeline). For more information about Pipeline and pipeline components visit here

We need to follow certain procedures before the component get used by Biztalk. They are

1. After building the pipeline component in visual studio, the dll needs to be copied to the location “C:\Program Files\Microsoft BizTalk Server 2006\Pipeline Components” (or 2004).

Reasons for that (a) Visual Studio designer will pick up the dll from this location, so you can add them to the visual studio tools, while creating Pipelines. (2) When you start the Biztalk service the “dlls” will be loaded into the host instance (BTSNTSVC service) from this location. and (3) When an isolated host is started (by receiving messages via isolated host instance, i.e HTTP and SOAP adapter) W3WP service load the pipeline component from this location.

2. Since the dll is loaded by Visual Studio (if you have opened a Pipeline Project), BTSNTSVC Service and/or W3WP, you need to stop the BTSNTSVC service, IISRESET and close Visual Studio project (Pipelines development) before copying the dll to the location “C:\Program Files\Microsoft BizTalk Server 2006\Pipeline Components” (or 2004).

3. After copying you need to start the BTSNTSVC service.

4. The external components referenced within a pipeline components needs to be deployed in the GAC (Uninstall prior to installation is good).

To do the above steps each time when we make a change will end up as an annoying thing over the development period.

We can cut down some of the steps using the following steps.

1. Create a separate project for pipeline components and the external assemblies its referencing to. Don’t put the pipeline components along with the solution which has Pipelines project (please note Pipelines and pipeline components are two different things)

2. Within Visual Studio, On the pipeline components project, right-click on the project, go to properties, select “Build Events” and click “Edit Post Build…” button. Copy the following script and click OK.

IF $(ConfigurationName) EQU Release GOTO done
xcopy “$(ProjectDir)$(Outdir)$(TargetFileName)” “C:\Program Files\Microsoft BizTalk Server 2006\Pipeline Components” /R /Y /F
IF %ERRORLEVEL% EQU 0 GOTO done
net stop “BizTalk Service BizTalk Group : BizTalkServerApplication”
iisreset
xcopy “$(ProjectDir)$(Outdir)$(TargetFileName)” “C:\Program Files\Microsoft BizTalk Server 2006\Pipeline Components” /R /Y /F
net start “BizTalk Service BizTalk Group : BizTalkServerApplication”
:done

3. On the external components project referenced by pipeline components, put the following script.

“C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe” /i “$(TargetPath)”

The scripts are quite straight forward, all it does is copies the dll to the correct location, if it gets some sharing violation it slops, BizTalk, IIS and tries again to copy the dll. On the 3rd step it reinstalls the referenced assemblies in the GAC.

The only manual thing you need to do is, close the Visual Studio Pipeline (not pipeline component) project, referencing the pipeline component under development.

I’m sure this will help developers quite a lot of time during pipeline component development.

useful links
Pipeline Component Wizard

EQUAL predicate beween Object types and Strings – Breaks in 2006

Here is a question I received on my blog:


We have hundreds of BTS2004 rules where we use the EQUAL predicate beween Object types and Strings.
Now I discovered that BTS2006 does not permit this anymore. Why is it undocumented? How do I migrate those Rules in BTS2006 ?


SINCE I don’t have an email address to respond to, I am posting the answer here.


ANSWER: This is a known bug that was not caught in the regression test. The SDE (Software Design Engineer) for BRE is aware of the bug and have the fix for it. However, you need to open an issue with our BizTalk support team and have it escalated to (QFE) Quick Fix Engineering team to get the fix.


Regards,
Sreedhar

EQUAL predicate beween Object types and Strings – Breaks in 2006

Here is a question I received on my blog:


We have hundreds of BTS2004 rules where we use the EQUAL predicate beween Object types and Strings.
Now I discovered that BTS2006 does not permit this anymore. Why is it undocumented? How do I migrate those Rules in BTS2006 ?


SINCE I don’t have an email address to respond to, I am posting the answer here.


ANSWER: This is a known bug that was not caught in the regression test. The SDE (Software Design Engineer) for BRE is aware of the bug and have the fix for it. However, you need to open an issue with our BizTalk support team and have it escalated to (QFE) Quick Fix Engineering team to get the fix.


Regards,
Sreedhar

Ideas for BRE samples

Hi all,


I am planning to create more BRE samples. I would really appreciate if you could let me know what kind of BRE samples you are looking for. If you have any feedback on BRE documentation, send it my way.


Thanks & Regards,


——————————————————


Sreedhar Pelluru, MCSD .NET, MCTS (BizTalk)               


BizTalk Server User Education Team


Microsoft Corporation



——————————————————