March 2010 - Posts

Have you ever got this error message: “The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)” when running a BizTalk application? Perhaps a more precise description and full story is in order…

The error

error_eventviewer

I read this to a colleague of mine, who had previously stated that “long filenames can get you into trouble when used on pipelines”. Her response was one of recognition and so I began searching for reasons and maximum lengths. Despite Google's lack of answers I found that the main reason is that the fully qualified name of the pipeline is too long.

How long is too long

When developing pipelines, looking at the properties, the combined length of the “Namespace” and “Type name” properties cannot exceed 254. For those of you who wanted extra credit in school and want the number to be 256, well you are right because two more signs (“ ,”) are added between the type name and namespace thus making it 256. However these are added by deployment and you cannot omit them.

To be sure I have tested both the lengths of the type name and the namespace and I am sure that it is the combined length that must not exceed 254.

The reason

I am actually not sure that this is the actual reason (since I do not work for the MSFT product team) but evidence points to this: The reason is that the table column that holds the data in the management database cannot hold more that 256 nvarchar. I am not sure of this so any feedback is welcome.

bts_pipeline_table

To make matters worse I have not found any warning when deploying pipelines with long names. Also, the pipelines are imported into BizTalk, they are configurable and does not crash until used in runtime.

The rhyme

When developing BizTalk artefacts with a naming convention that uses long names; beware of the 254/256 limit.

This is only an issue if you are using a computer that is not part of the domain (typically a VPC configured for workgroup).

People that use BizTalk tend to have a nice image that sports VS, BizTalk, SQL server, and Team Explorer if you use TFS. 9 times out of 10 this image is not part of the domain were the TFS server resides. This means that every single time you open visual studio you have to enter your domain credentials! This is tedious, boring and sometimes quite irritating. The reason is that you do not get that nice little tick box that says; “Remember my password”.

However there is a nice work around.

Open Team Explorer, right-click a project and choose “Show Project Portal”.

ShowProjectPortal

You will then get this nice dialog asking for your credentials.

login

There is that nice little tick box! Simply enter your credentials, tick the box and click OK.

Now you don’t have to enter you credentials again when opening Visual Studio.

[Edit 2010-05-21]

Also, as pointed out by commenter Daniel Brünteson, you can easily add the credentials directly to the “Credential Manager”. This is a really nice way to handle credentials.

This is also how I do it nowdays.