BizTalk Maven

A few notes on BizTalk

How to: Adding a calendar in the Android ICS emulator

Posted by Jeremy on 22/01/2012

If, like me, you’re trying to interact with the Calendar in ICS, chances are, you’re going to try to add a calendar in the emulator.

Easier said than done!

For some reason, after adding my Gmail account to the Settings, the emails synced, but not the Calendar.

Probably a bug, maybe not, it doesn’t matter: there is a workaround.

The only way to do it seems to add your Gmail account as an Exchange account and then change some connection details.

You need to enable SSL certificates and change the server name to m.google.com.

Your settings screens should look something like this:

 

 

 

 

 

 

 

 

 

 

 

Now go back to the calendars and you’ll see your calendar synchronized.

 

Posted in Android, Calendar API, Emulator, ICS | Tagged: , , , , , , | Leave a Comment »

Disabling the “Attach Security Warning” window in Visual Studio

Posted by Jeremy on 27/01/2011

Finally!
I’ve been working with Visual Studio for years and I’ve had enough of the “Attach Security Warning” window popping-up every time I want to attach a process.

Here is how to turn it off:

  • Shut down all your instances of Visual Studio (at least the ones for the version your want to tweak)
  • Go to the registry (type regedit in the command window)
  • Go to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Debugger\DisableAttachSecurityWarning and change the value there from 0 to 1.

10.0 is for Visual Studio 2010
9.0 is for Visual Studio 2008
8.0 is for Visual Studio 2005

That’s it!



Posted in Tips and Tricks, Uncategorized | Tagged: , , | Leave a Comment »

Failed while creating a [orchestration type] service

Posted by Jeremy on 19/08/2010

This is more of a note to self, every time I see this one (it’s quite rare), I’m kinda wondering where I’ve seen it before.
I was running some tests, after having made a few changes to an orchestration, and to my surprise I found this error (source: XLANGs) in the eventLog:


Failed while creating a [my orchestration name] service.
Exception type: ServiceCreationException

The following is a stack trace that identifies the location where the exception occured
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._serviceCreator(Guid& instanceId, Object objCurrMsg)
at Microsoft.XLANGs.Core.ResourceContainer._allocateResource(Guid& key, UInt32 hashKey, ResourceCreator resCreator, Object creationContext)
at Microsoft.XLANGs.Core.ResourceContainer.Dispense(Guid& key, ResourceCreator resCreator, Object creationContext)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._dispenseService(Guid& instanceId, IBTMessage currMsg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._tryReceiveOneMessage(Boolean& loggedError, Guid& instanceId, IBTMessage currMsg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._receiveOneMessage(Guid& instanceId, Guid& serviceId, IBTMessage currentMsg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession.ReceiveMessages(IBTMessage[] messages, Int32 firstIdx, Int32 count)
at Microsoft.BizTalk.XLANGs.BTXEngine.AppDomains.AppDomainRoot.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object objMsg)
at Microsoft.XLANGs.BizTalk.CrossProcess.AppDomainStubProxy.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object msgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
at System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Messaging.ServerContextTerminatorSink.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessageCallback(Object[] args)
at System.Threading.Thread.CompleteCrossContextCallback(InternalCrossContextDelegate ftnToCall, Object[] args)
at System.Threading.Thread.InternalCrossContextCallback(Context ctx, IntPtr ctxID, Int32 appDomainID, InternalCrossContextDelegate ftnToCall, Object[] args)
at System.Threading.Thread.InternalCrossContextCallback(Context ctx, InternalCrossContextDelegate ftnToCall, Object[] args)
at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Channels.ChannelServices.SyncDispatchMessage(IMessage msg)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(Byte[] reqStmBuff, SmuggledMethodCallMessage smuggledMcm, SmuggledMethodReturnMessage& smuggledMrm)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatchCallback(Object[] args)
at System.Threading.Thread.CompleteCrossContextCallback(InternalCrossContextDelegate ftnToCall, Object[] args)

Additional error information:
Could not load type ‘[my orchestration full name]‘ from assembly ‘[the assembly]‘.
Exception type: TypeLoadException

Source: mscorlib
Target Site: Void* _GetTypeByName(System.String, Boolean, Boolean, Boolean, System.Threading.StackCrawlMark ByRef, Boolean)
The following is a stack trace that identifies the location where the exception occured
at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.Type.GetType(String typeName, Boolean throwOnError)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXServiceStaticState.Resolve()
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._createNewService(Guid& serviceId, Guid& instanceId, BTXServiceStaticState staticState)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._createOrRehydrateRealService(Guid& instanceId, IBTMessage currMsg)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


You have to agree, it looks pretty nasty.
Simple to fix though : you just have to rebuild and re-GAC. But make sure you do it properly, even if you have to un-GAC the old assembly.

Posted in BizTalk, Errors | Tagged: , , , | Leave a Comment »

Delete all your BizTalk databases at once

Posted by Jeremy on 15/06/2010

Sometimes, you screw up your BizTalk configuration, and rather than trying to fix it up, it’s better to just delete your databases and start afresh.

Here is a script that I use to do just that – it also closes your existing connections:

IF EXISTS (SELECT name FROM sys.databases WHERE name = N'BAMArchive')
ALTER DATABASE BAMArchive SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DROP DATABASE BAMArchive
GO

IF EXISTS (SELECT name FROM sys.databases WHERE name = N'BAMPrimaryImport')
ALTER DATABASE BAMPrimaryImport SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DROP DATABASE BAMPrimaryImport
GO

IF EXISTS (SELECT name FROM sys.databases WHERE name = N'BAMStarSchema')
ALTER DATABASE BAMStarSchema SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DROP DATABASE BAMStarSchema
GO

IF EXISTS (SELECT name FROM sys.databases WHERE name = N'BizTalkDTADb')
ALTER DATABASE BizTalkDTADb SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DROP DATABASE BizTalkDTADb
GO

IF EXISTS (SELECT name FROM sys.databases WHERE name = N'BizTalkMgmtDb')
ALTER DATABASE BizTalkMgmtDb SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DROP DATABASE BizTalkMgmtDb
GO

IF EXISTS (SELECT name FROM sys.databases WHERE name = N'BizTalkMsgBoxDb')
ALTER DATABASE BizTalkMsgBoxDb SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DROP DATABASE BizTalkMsgBoxDb
GO

IF EXISTS (SELECT name FROM sys.databases WHERE name = N'BizTalkRuleEngineDb')
ALTER DATABASE BizTalkRuleEngineDb SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DROP DATABASE BizTalkRuleEngineDb
GO

IF EXISTS (SELECT name FROM sys.databases WHERE name = N'SSODB')
ALTER DATABASE SSODB SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DROP DATABASE SSODB
GO

Posted in BizTalk, Scripts, SQL | Tagged: , , | Leave a Comment »

Installing and using the BizTalk ESB Exception Notification Service

Posted by Jeremy on 14/03/2010

Introduction

The ESB Management Portal Alert Service is a windows service that notifies users of exceptions published to the ESB Management Portal. The service polls the exception database for new exceptions and evaluates these against exception alerts that users have created in the ESB Management Portal.  The service then notifies any users or groups of users that have subscribed to the alert. The service retrieves notification e-mail addresses and group memberships from Microsoft Active Directory directory service. This service has no dependency on Microsoft BizTalk Server.

Prerequisites

Configure SMTP on IIS 7:

1. Start >> Administrative Tools >> Server Manager
    Go to Features on the left side, select Add Features, and tick SMTP server.
    Choose to install the required Remote Server Admin Tools
2. Run >> services.msc and check that the Simple Mail Transfer Protocol (SMTP) service is running
3. Open Start >> Administrative Tools >> Internet Information Services (IIS) Manager
4. Expand the server node and click on the website
5. Click on the SMTP E-Mail icon
     clip_image002[4]
6. Configure the properties as in the image below
     clip_image004[4]

Configure Default Virtual SMTP server on IIS 6.0 Manager:

1. Start >> Administrative Tools >> Internet Information Services (IIS) 6.0 Manager
2. Expand the (local computer) node, right click on the SMTP virtual server node and choose properties
3. Choose you IP address of your local machine
    clip_image006[4]

4. Click on the Advanced button next to the IP address and make sure the port 25 is assigned to this IP
    clip_image008[4]

5. Close the Advanced window and select the Access tab
6. Click on Relay and add your IP to the list
    clip_image010[4]
7. Click OK twice
8. Make sure the SMTP server is started

Installation

1. Open C:\Projects\Microsoft.Practices.ESB\ESBSource\Source\Samples\Management Portal\ESB.AlertService\ESB.AlertService.sln and build the solution
2. Go to C:\Projects\Microsoft.Practices.ESB\ESBSource\Source\Samples\Management Portal\ESB.AlertService.Install\Release and run setup.exe
3. When prompted, enter your username and password.
    Select an account that is a member of the BizTalk Application Users group with access to both the EsbExceptionDb database and the server hosting the alert service.
    Type the account name in the form: <DomainName>\<UserName>
    clip_image011[4]
4. Run >> services.msc and make sure that the BizTalk ESB Exception Notification service is running.
    If not, start it.

Configuration

Fault Settings configuration

1. Navigate to the ESB Management Portal http://localhost/ESB.Portal
2. On the menu bar, choose Admin >> Fault Settings
3. Change the Email XSLT File Absolute Path to C:\Program Files\Microsoft BizTalk ESB Toolkit 2.0\Exception Notification Service\EmailTransformation.xslt
    (for some obscure reason the path currently given is the one from the ESB Guidance 1.0)
4. Make sure to tick the Enable Alert Queue Service, even if you only want to use the email functionality
    This is a workaround to a bug that stalls the CPU to 100% and prevents emails from being sent.
    clip_image012[4]

Alerts configuration

1. Navigate to the ESB Management Portal http://localhost/ESB.Portal
2. On the menu bar, choose Alerts
3. Click on Create Alert
4. Enter a name for the alert
5. Add conditions for your alert
    The conditions are combined with an AND clause
6. Click Add
7. Save

Subscriptions configuration

1. Click on Add Subscriptions
2. Enter the Custom Email of the recipient for the alert
3. Optionally add Start time, End time and Black-out Period (like the next holidays for example)
4. Click Save 
 temp

Uninstallation

1. Open Start >> Control Panel >> Programs and Features
2. Uninstall BizTalk ESB Exception Notification Service

 

Tips:
· Always restart the BizTalk ESB Exception Notification process after changing some configuration.
· To remove an alert, you have to remove the associated subscriptions first.
  Only after the subscriptions are removed will a delete cross appear next to the Alert available actions.
· If you’re not using the Alert Queue option, make sure that the polling interval in the Alert Queue Options and the Email Service Polling Interval are the same as the former defines the default…
· You also might want to open C:\Program Files\Microsoft BizTalk ESB Toolkit 2.0\Exception Notification Service\EmailTransformation.xslt, go to line 104 and correct the typo (“My Subscriptions” instead of “My Subscrriptions”)

 

References:
http://msdn.microsoft.com/en-us/library/ee236682(BTS.10).aspx

Platform:
Windows Server 2008
IIS 7
BizTalk Server 2009
BizTalk ESB Toolkit 2.0

Posted in BizTalk, ESB | Tagged: , , , , | 1 Comment »

The SOA Manifesto

Posted by Jeremy on 28/10/2009

What’s a manifesto anyway?

Manifesto
Main Entry: man·i·fes·to
Pronunciation: \ˌma-nə-ˈfes-(ˌ)tō\
Function: noun
Inflected Form(s): plural man·i·fes·tos or man·i·fes·toes
Etymology: Italian, denunciation, manifest, from manifestare to manifest, from Latin, from manifestus
Date: 1620

: a written statement declaring publicly the intentions, motives, or views of its issuer
source:http://www.merriam-webster.com

Basically, one day a few guys (or one guy sometimes) decide it’s time for them to take action.
They sit down together and put down on paper a set of rules about the subject of their choice and when they’re done, they have a manifesto.
Then, they publish it to the world, and welcome people to follow them : “Who’s with us on this one? Who agree that these are the rules?”

We all knew about the Agile manifesto who is basically a set of rules about Agile that the authors come to value.
We also had the Open Cloud manifesto, to which some big players didn’t sign.
We now have the SOA manifesto .

It was announced at the 2nd International SOA Symposium taking place at the World Trade Center, in Rotterdam, Netherlands on October 23, 2009.

Everybody has different definitions for SOA (Servie Oriented Architecture), so some well respected SOA pioneers/architects/leaders decided it was time to clarify it once and for all.
And here you go, we now have a proper manifesto in due form.
It looks quite similar (in form not in content) to the Agile manifesto, and for some reason, in both there are 17 signatories.
If someone can explain me why, I’d be happy to hear about it.

There is also a video of the announcement:

What do you think the next manifesto will be about?


Posted in General | Tagged: , | Leave a Comment »

First Steps with BizUnit

Posted by Jeremy on 12/10/2009

I’ve always been afraid to use BizUnit.
It seemed like a lot of work had to be done before I could actually test anything so I never really bothered to look into it.
I was recently on a project where testing any functionality was a very very long process.
Put some files somewhere, check some emails, go to a website, check SQL tables … you know the drill.
At some point I had enough and decided to see what all the fuss about BizUnit was about.
Let me tell you that from now on, this is how I’ll do testing.
The documentation is clearly not the best in the world, so I’ve cooked up a very simple example for anyone interested to start using BizUnit.

The little solution

The solution in this example is very simple:

BizTalk picks up a file from a folder location, applies a little transformation, and send the result to another location.
I could have done it without an orchestration, but I still used one for you guys to add some functionality to it if you wanted to extend the example a bit.

0. Installation of BizUnit

You can download it here and install it following the installation steps – nothing fancy here.

1. Identify the steps required for testing

After you’ve implemented and deployed your BizTalk solution and that you’re ready to test it, you need first of all to identify the steps required for testing:

  • Do you need to put some files in a folder for BizTalk to pick up?
  • Do you need to validate some data in those files first?
  • Do you need to see if some rows got successfully inserted in some SQL tables?

Basically, write down all you need to check for your test to be declared successful.

For my little solution, I have 5 steps:

1. Delete all the files present in the receive location
2. Put a file in the receiving location
3. Wait 10 seconds – give time to Biztalk to do its business
4. Check there is a file in the send port location
5. Delete the file in the send port location

2. Create the Test Cases

A TestCase is an XML file that declares all the steps described in the section above.
It consists of 3 distinct parts:

  • TestSetup – this stage is used to setup your environment (here we’ll do step 1)
  • TestExecution – this stage will do the actual test (here we’ll do step 2, 3 and 4)
  • TestCleanup – this stage will cleanup the environment to leave it as it was. (here we’ll do step 5).   This stage will execute even if the previous stages fail.

Each of these stages has 0, 1 or multiple TestSteps which represents the actual steps we described above.

The basic structure of a TestCase is like this:

<TestCase testName="Test_01">
<TestSetup>
<TestStep assemblyPath="" typeName="">
</TestStep>
.
.
.
</TestSetup>

<TestExecution>
<TestStep assemblyPath="" typeName="">
</TestStep>
.
.
.
</TestExecution>

<TestCleanup>
<TestStep assemblyPath="" typeName="">
</TestStep>
.
.
.
</TestCleanup>
</TestCase>

Each of the TestSteps has a typeName attribute and some parameters as element.
The typeName tells us what function to execute and the parameters are parameters of this function.
You create all the steps you need in the stages where they must be executed.
For example, to copy a file from a folder to another, the testStep will look like this:

<TestStep assemblyPath="" typeName="BizUnit.FileCreateStep">
<SourcePath>source.xml</SourcePath>
<CreationPath>destination.xml</CreationPath>
</TestStep>

For deleting files from a folder the function is BizUnit.FileDeleteMultipleStep, to add a delay it is BizUnit.DelayStep etc…
There are functions for almost everything.
It’s a bit of a hassle because there isn’t any structured XML so you don’t have intellisense here.
The place to go and look at if you’re looking for a method is the BizUnit.chm (located in C:\Program Files\BizUnit\BizUnit 3.1\bins).
If you’re interested in how any method operates, you should look into the BizUnit solution (located in C:\Program Files\BizUnit\BizUnit 3.1) where most of them are.

3. Create a test project (if you do tests with Visual Studio) or a class library (if you use NUnit)

Add a test project and then add a reference to the BizUnit assembly (C:\Program Files\BizUnit\BizUnit 3.1\bins\BizUnit.dll)
Then add 1 TestMethod per XML TestCase file.
We have one TestCase XML for our tests so we have only one test method.
In the TestMethod, the code to invoke BizUnit looks like this:

[TestMethod]
public void TestMethod1()
{
BizUnit.BizUnit bizunit = new BizUnit.BizUnit(@"path\TestCase_01.xml");
bizunit.RunTest();
}

4. Run your tests

Once you’ve done all the above, you’re ready to test.
Run your test and check that it passed.
If you click on the Test Result row, you can see the output of the tests in the Standard Console Output.

I hope this helps in starting with BizUnit.
The source code for my example is provided below.
It includes everything you need for our example : the BizTalk project, the test project, the TestCase, the binding file (for the ports) and the test file and folders.


Posted in BizTalk, BizUnit, Testing, Tools | Tagged: , , , | 4 Comments »

The Windows 7 Resource Monitor

Posted by Jeremy on 30/07/2009

We all know that the way your resources are allocated in your system plays an important role in how the performance of the said system will be.
When the computer is slow, we typically open the Task Manager and look for the culprit by looking at the CPU and Memory columns.
Well, same thing here, but better.
In the performance tab of the the Windows 7 Task Manager, there is a button that opens the Resource Monitor.
This is new to Windows 7 and you can also open it directly by doing ‘Run’ and then ‘resmon’.
Let’s explore what’s in it.

Here is a screenshot of the overview:

As you can see, in the overview tab, there are expandable areas for CPU, Disk, Network and Memory.
There are also tabs for each one of these, in which you have a bit more detail.
In the CPU area you can right-click on one of the process

and you’ll get the options to end or suspend the process, but also to ‘search online’ which basically opens your default browser and searches for myprocess.exe on Google, and to ‘Analyze wait chain’.

The last one tells you either that the process runs normally, or that it is waiting for another process to finish in order for your process to continue.
This is good to see why a window is unresponsive for example.
You can also select the process and click End Process. No need to explain what it does.

It looks like this:

Let’s now look at the different tabs in more detail.

The CPU tab:

In the CPU tab, you have lists of Processes, Services, but also Associated Handles and Associated Modules.
The last two are empty until you select a process, not by highlighting it but by selecting the box.

The filtered areas get highlighted.
Also, note that you can select and view multiple processes, but all the selected ones go to the top of the list of processes.
This way you don’t have to run after the selected process up and down the list when it has a sudden change in the number of threads for example.
When you select a process, it stays selected across the tabs and you see only the info relevant to this process.
You can also stop and start Services from here, as well as search Handles (look at the search box in the Associated Handles area).
The Associated Handles shows you the registry keys, the files and the directories used by the process.

The Memory tab:

The only interesting thing here is the grey area on the left.
This is actually the amount of RAM I’m losing because I’m using the 32-bit version of Windows.
In the 64-bit version this grey chunk is almost inexistent.

The Disk tab:

The good thing here is that only the processes that have disk activity are shown.
If you select one of them, it will filter the files in the Disk Activity area so that you can see exactly which files are used by the selected process.

The Network tab:

This is nice as well, you get to see all the Network Activity very clearly.
Here you can see the ports used by your applications, you can see the firewall status (look at the bottom right corner), and you can see the bandwidth used by an app.
That’s the place to go if you feel that one of your application is taking up all the bandwidth.
Here, as well as in the Disk tab, when you select a process, you see its graph on the right highlighted in orange.

This is all very useful, and all very tidy.
The user is not overwhelmed by unnecessary data and the filtering and the highlighting make it all very easy to use.

Posted in General, Tools | Tagged: , | Leave a Comment »

Installing the BizTalk Adapter Pack on 64-bit platforms

Posted by Jeremy on 30/07/2009

Apparently, the BizTalk Server Administration Console runs a 32-bit Microsoft Management Console (MMC) application.
So if you want to install the BizTalk Adapter Pack 2.0 on your 64-bit machine and use it to do design-time tasks (either in Visual Studio or the BizTalk MMC), you should install the Adapter Pack 32-bit version.
If it is for the BizTalk run time (when sending and receiving messages from LOB applications), then the 64-bit version will do, but not always…

Here is what I found (from MS):

Scenarios for Installing the BizTalk Adapter Pack on a 32-bit Platform:

For Visual Studio design time For BizTalk MMC design time For BizTalk run time For Visual Studio design time and/or BizTalk MMC design time + BizTalk run time
· Install 32-bit WCF LOB Adapter SDK.

· Install 32-bit BizTalk Adapter Pack.

· Install 32-bit LOB client and other required DLLs.

· Install 32-bit WCF LOB Adapter SDK.

· Install 32-bit BizTalk Adapter Pack.

· Install 32-bit LOB client and other required DLLs.

· Install 32-bit WCF LOB Adapter SDK.

· Install 32-bit BizTalk Adapter Pack.

· Install 32-bit LOB client and other required DLLs.

· Install 32-bit WCF LOB Adapter SDK.

· Install 32-bit BizTalk Adapter Pack.

· Install 32-bit LOB client and other required DLLs.

Scenarios for Installing the BizTalk Adapter Pack on a 64-bit Platform:

For Visual Studio design time For BizTalk MMC design time For BizTalk run time For Visual Studio design time and/or BizTalk MMC design time + BizTalk run time
· Install 64-bit WCF LOB Adapter SDK.

· Install 32-bit BizTalk Adapter Pack.

· Install 32-bit LOB client and other required DLLs.

· Install 64-bit WCF LOB Adapter SDK.

· Install 32-bit BizTalk Adapter Pack.

· Install 32-bit LOB client and other required DLLs.

For a 32-bit BizTalk process:

· Install 64-bit WCF LOB Adapter SDK.

· Install 32-bit BizTalk Adapter Pack.

· Install 32-bit LOB client and other required DLLs.

For a 64-bit BizTalk process:

· Install 64-bit WCF LOB Adapter SDK.

· Install 64-bit BizTalk Adapter Pack.

· Install 64-bit LOB client and other required DLLs.

For a 32-bit BizTalk process:

· Install 64-bit WCF LOB Adapter SDK.

· Install 32-bit BizTalk Adapter Pack.

· Install 32-bit LOB client and other required DLLs.

For a 64-bit BizTalk process:

· Install 64-bit WCF LOB Adapter SDK.

· Install 64-bit BizTalk Adapter Pack.

· Install 64-bit LOB client and other required DLLs.

· Install 32-bit BizTalk Adapter Pack.

· Install 32-bit LOB client and other required DLLs.

Posted in Adapters, BizTalk | Tagged: , , , , , | Leave a Comment »

The history of Microsoft

Posted by Jeremy on 30/03/2009

Very interesting (for Microsoft fans that is) series on channel9 reviewing the history of Microsoft since its beginning in 1975.
Every Thursday a new episode will be added. Stay tuned.

The link here.

Posted in Links, Microsoft, Videos | Tagged: , , | Leave a Comment »

No vpc network adapter enumerated or no host network adapter with provided MAC address found

Posted by Jeremy on 24/03/2009

The other day I had to transfer my entire machine (a Dell Inspiron E5500) to another identical machine, because I had a problem with the sound card of the first one.
I backed it up and restored this backup on the new machine and everything looked fine: I had all my settings, all my files and all my drivers.
Since I was working on a Windows Mobile application, the first thing I checked was if it would compile and execute correctly on the new machine.
So I opened my solution, clicked on debug and surprise, I get this error : “No vpc network adapter enumerated or no host network adapter with provided MAC address found”.
I looked everywhere to see what has been altered, until I finally gave up and looked up on Google for a solution.
What I found is that if you do not have the Virtual Machine Network Services installed, then you’ll get this error.

Furthermore, this driver is not downloadable anymore from the Microsoft web site because it comes with VPC 2007.
I already had VPC 2007 installed on my computer, so I went and checked if I had this driver.
Surprise again when I saw that I did!

Ok, we all know where this led me.
Uninstall VPC, reinstall VPC, reboot, re-reboot and many other vain attempts later, I still had the same error.
Basically all this had nothing to do with this driver.
What solved it was to delete the saved state of my emulator (.dess files located in C:\Users\you\AppData\Roaming\Microsoft\Device Emulator ) .
Apparently the emulators get bound to a network adapter on the PC, and a change in my hardware led to this error.

Lost one hour, but now I know.

Posted in Errors | Tagged: , | 4 Comments »

The subst command

Posted by Jeremy on 03/12/2008

Here is a quick one I always forget.
There is a possibility to map a folder to a virtual drive using the DOS command subst .
This is quite useful if there is a folder located quite deep in your file system that you use quite often and that you want to be able to open easily.

For my documents folder, I would type something like this:
In Run, type subst s: C:\Users\Jeremy\Documents and then press OK.
Now open Run again (or even any folder window) and type s:
The path you specified (here C:\Users\Jeremy\Documents) in the command is now substituted by s:
Note that when you assign a shortcut like this, the drive letter you chose will not be available in Map Network Drive anymore as it is already assigned.
This will last until you restart your computer or delete the drive with the command subst s: /D

Posted in Random, Tips and Tricks | Tagged: , | Leave a Comment »

BizTalk maps on Vista

Posted by Jeremy on 02/12/2008

I’ve just started using Vista on my PC and, as you sometimes do when you’re into BizTalk development, I needed to create a map.
Soon enough I found out that there is a little problem with the BizTalk Mapper under Vista:
Functoids does not seem to work too well in the sense that when you try to link an element to a functoid, it does not link properly and the incoming link looks kind of broken.

Furthermore, the Input Parameters window is empty.


If you edit the map as XML, you’ll notice that the right code is in the right place:

Basically, it is just an editor problem and your map will compile and test successfully.
The problem of course is when you need to edit and change your input variables.
Simply closing and opening the map will fix everything.

Posted in Mapping, XSLT | Tagged: , , | Leave a Comment »

PDC 2008 Videos on Channel9

Posted by Jeremy on 30/11/2008

All the videos are here and there’s a lot to see: http://channel9.msdn.com/pdc2008/

Posted in Links, Microsoft, Videos | Tagged: , , | Leave a Comment »

Microsoft Codenames list

Posted by Jeremy on 19/10/2008

Keeping in sync with all the new products released by Microsoft is getting very difficult these days…
It’s even more difficult when you start following a product when it is still codenamed : products descriptions changes, some features move to another product or another release, or product (like Oslo) simply split in multiple products.
Mary Jo Foley has put up a (free) list of all the products codenames she knows about and will be updating it every month.
It’s called CodeTracker and can be found here.

Posted in Links, Microsoft | Tagged: , | Leave a Comment »

Searching in Stored Procedures

Posted by Jeremy on 04/09/2008

A very convenient way to search for specific text in stored procedures is to use the view INFORMATION_SCHEMA.ROUTINES.
If you type this SQL query :

SELECT * FROM INFORMATION_SCHEMA.ROUTINES

you’ll see a lot of information about the stores procedures of the database where you executed your query, including the code of the procedure.
Now if you have a lot of stored procedures, are looking for a specific word and need some answers quick, try this:

SELECT  ROUTINE_NAME, LAST_ALTERED
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE='PROCEDURE' AND  ROUTINE_DEFINITION LIKE '%yourTextHere%'
ORDER BY ROUTINE_NAME

You just need to Execute that and you got your answer!

Posted in SQL, Tips and Tricks | Tagged: , | 1 Comment »

GACing made easy.

Posted by Jeremy on 28/08/2008

As a BizTalk developer, you need to GAC, GAC and GAC again, over and over.
Oh, GAC stands for Global Assembly Cache (but everyone that reads this article knows that, right?), and “to GAC” means to put an assembly in the GAC.
So as I said, this action of GACing is repeated many times during development and, let’s be honest, it’s a pain.

The reasons why GAC is good for you are multiple:
- it gives you the ability to use the same assembly for multiple applications (hence its name)
- you can have multiple versions of the same assembly deployed thus allowing side-by-side execution.

To GAC, someone that just starts using BizTalk usually clicks on the project, copies the path of the project folder, open Run, copy the path, go to the bin folder, open the GAC folder (Run –> assembly) and drag the compiled assembly to the GAC.
Copy-Paste does not work, an assembly is added/updated to the GAC only by dragging.
And you have to do that every time you want to run your application using the latest version of either a BizTalk assembly or an assembly BizTalk uses.
And that’s really annoying, don’t you think/know?
There are ways to do it just painless, one click or two at most.
By the way, on a development machine it’s not so important, but believe me when you need to apply a single patch to a production environment, it is essential you backup, just in case you made a mistake and need to rollback.

So first, let’s see how you can backup the assembly stored in your GAC.
Type C:\WINDOWS\assembly\GAC_MSIL or C:\WINDOWS\assembly\gac (gac in lowercase) in Run and you have all the folders with your assemblies in them.
Backup and now you can GAC.

Now, as I said, there are a few ways to GAC an assembly much faster than described above.
There are 3 solutions I know of, it’s up to you to use the one that suits you most.

  • First you can add a registry entry that will allows you to right-click on the assembly and GAC it.
    To do this, you create a file called for example addToGAC.reg, edit it and copy the following:

    [HKEY_CLASSES_ROOT\dllfile\shell\Add to GAC\command]
    @=”\” C:\\Program Files\\Microsoft Visual Studio 8\\SDK\\v2.0\\Bin\\gacutil.exe\” /i \”%1\”"

    Now if you right click the assembly, you’ll see the “Add to GAC” option and this will add the assembly to the GAC.
    You won’t have to drag anymore, which is already two steps less, but you can do better.

Here’s how:

  • In VS, go to Tools -> External Tools, click on Add, and enter a
    - title, for example “GAC assembly”
    - command  : c:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe
    - argument: /i $(TargetPath)
    - initial directory: $(TargetDir)
    and apply.

    When you build a project and you want to add the assembly to the GAC, just have the project highlighted, and click Tools –> GAC assembly and that’s it, it’s GACed. Of course you have to do this step once in your environment and that’s it.

No more bin and development opened folders by the dozen.
Even better than the previous solution, right?

  • Alternatively, you can also have a post-build event that will  automatically GAC the assembly after a build, but be cautious because sometimes you want to build but don’t want to install to the GAC automatically so this option can get pretty annoying.
    If you’re interested though here’s how you do:

    • For a BizTalk assembly, just set to true the option “install to global assembly cache” in the BizTalk project properties.
      This will install the assembly to the GAC only after deployment, not build.
      Here you’re better off with the previous option.
    • For a .NET assembly, go to properties of the project, go to Build Events and in the Post-build event command line, copy this:
      “$(DevEnvDir)..\..\SDK\v2.0\Bin\GacUtil.exe” /i “$(TargetPath)” /f
      When you build, the assembly will be GACed automatically.

That’s all.
Well, happy easy GACing!

Posted in BizTalk, Tips and Tricks | Tagged: , | Leave a Comment »

Generating a class from a schema that has imported schemas in its definition using xsd.exe

Posted by Jeremy on 02/08/2008

Sometimes you need to use not only the schema but also the class of an object you need to use.
If the schema has imported schemas in its definition, there is a little trick to know if you wan to generate its class.

Let’s say you have a schema Customer that has Address and BillingInfo nodes imported from other schemas, and you attempt to create the Customer class using xsd.exe, you’ll probably do this:
c:\Program Files\Microsoft Visual Studio 8\VC>xsd /c /l:cs /o:C:\GeneratedClasses\ “C:\Projects\Schemas\customer.xsd”
But because you have imported schemas, it won’t work and you’ll get this error:

Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation. All rights reserved.
Schema validation warning: The ‘http://ImportedSchemas.address:Address‘ element is not declared. Line 21, position 10.
Schema validation warning: The ‘http://ImportedSchemas.BillingInfo:BillingInfo‘ element is not declared. Line 22, position 10.
Warning: Schema could not be validated. Class generation may fail or may produce incorrect results.
Error: Error generating classes for schema ‘C:\Projects\Schemas\customer’.
- The element ‘http://ImportedSchemas.address:Address‘ is missing.
If you would like more help, please type “xsd /?”.

The thing to do is to specify all 3 schemas in the command.
This will generate one single file with all 3 classes.
So if you do
c:\Program Files\Microsoft Visual Studio 8\VC>xsd /c /l:cs /o:C:\GeneratedClasses\ “C:\Projects\Schemas\Address.xsd” “C:\Projects\Schemas\BillingInfo.xsd” “C:\Projects\Schemas\customer.xsd”

Then you’ll get
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation. All rights reserved.
Writing file ‘C:\GeneratedClasses\customer.cs’.

And you can use your class.

Posted in BizTalk, Tips and Tricks | Tagged: , | Leave a Comment »

Enabling Message Properties Filter in HAT

Posted by Jeremy on 30/07/2008

First you enable tracking on Messages Bodies and Properties in the port .

Then, in the BTS admin you double-click on the schema that has the promoted property and you enable tracking there.

Finally you can go to the HAT and will find your property filter there.

Posted in BizTalk, HAT, Tips and Tricks | Tagged: , | Leave a Comment »

Shortcuts for the BizTalk orchestration Editor

Posted by Jeremy on 26/07/2008

Something I’ve noticed while working on an orchestration:
To add a shape, you can either right-click on a Shape connector line or use the BizTalk Orchestration Toolbox.
It can be quite frustrating sometimes when you use the first way because the shapes are not in alphabetical order so you have to read them all in order to get what you want.
If you right click on the shape connector line, show the choice of shapes and press one of the key below, the corresponding shape will appear.
Not such a big deal, but still useful.

W: Throw Exception
E: Send
T: Start Orchestration
Y: Delay
U: Construct Message
I: Decide
O: Loop
P: Parallel
A: Terminate
S: Scope
D: Suspend
F: Transform
G: Group
L: Listen
X: Expression
C: Call Orchestration
V: Receive
M: Message Assignment
R: Call Rules (works only in atomic scopes…)
N: Compensate (provided you’re in a compensation block)

Posted in BizTalk, Tips and Tricks | Tagged: , , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 84 other followers