BizTalk Patterns Wizard from Jon Flanders!!!

Sometime back, i had a bizarre requirement from my customer asking us to deliver a platform, which would eliminate developers and allow the end-user to create orchestrations, services on their own. (Note: The end-user is non-technicalandshould not be concerned withtechnical details of these services in BizTalk)…I wasapprehensive in the beginning, but Jon came up with […]

Templates for Windows Workflow XAML activation projects

One of my frustrations with Windows Workflow Foundation, is that there is no easy way in Visual Studio to create pure XAML workflows. The tools really drive you toward compiling the XAML into a .NET assembly. That, to me, defeats the purpose of using XAML. So I created a bunch of project templates (console/library & state/sequence) that create pure XAML workflows using XAML activation. This means the workflows are not compiled, the XAML is just copied into the build directory. The console application project templates are setup in their program.cs to load these XAML files using an XMLReader and activate them that way.
I also started working on XAML item templates so you could add individual items to a project. The problem I am having is I don’t think there is a way in the project template directly to indicate that the file should be treated as content type of None and copied to the output. I might have to write a custom wizard to get that part working. If anyone has any easier means of accomplishing this, let me know.
Enjoy!

Double-clicking to open Visual Studio solution files on Vista

I got so tired of not being able to double-click my solution files in the Windows explorer that I finally figured out how to fix it. First of all, I should mention that I’m running with UAC on in Vista and that I have VS configured to run as an admin. So, I get prompted each time I start it, but that’s OK, it’s a good reminder that I am running elevated and should test my code without the admin privileges.
I was trying to figure out why, when my VS is set to run as admin, double-clicking would not work. The thing that jumped out at me is that VS is not the default program for SLN files. The Visual Studio Version Selector is the default program. My first thought was to run that selector as admin all the time, but that didn’t work. So, I decided I don’t need a version selector since I only have one version of VS on my machine right now, and mapped SLN files to DevEnv.exe. Now, when I double click them, I get the UAC prompt and then it opens right up in Visual Studio.
Hopefully this helps someone else with this little annoyance.

BizTalk, MSDTC, SSO and Cluster

Last night (BTW it was a Sunday) around 8PM I received a call from my ex-boss and good friend Mike Prager who is working as a Senior architect in one of the major retail project in UK, saying “Hey! SK, we had a power failure this afternoon in our data center and after the servers came back all our receive locations are disabled and send ports are not started. When I try to access them via the admin console, I’m receiving the error

Cannot retrieve list of objects due to a WMI provider failure

have you experienced this before.”

Well, I’ve seen this error in the past, but there are tons of things which can cause this error in BizTalk, we tried few things like checking whether all the SSO services are health on all the machines, MSDTC is running and configured correctly on each box, correct SSO master secret server is configured on the BizTalk group, etc, etc.

At last, I left Mike with the option to try DtcPing, since I’m not physically there. I couldn’t assist much.

This morning I received a call from enthusiastic Mike, saying “Hey! I solved the problem, the error is due to the race condition (dependency) between the DTC and SSO service in the SQL cluster. When the SSO service starts before the DTC, there is an issue. You get the WMI error. But if the DTC starts before SSO, everything is well and good.”

The reason I’m blogging it is I never experienced this before and it’s one of those strange things which we’ll never think about. I hope this will solve someone hours of troubleshooting time.

Thanks Mike, for sharing this information.

Nandri!

Saravana

I will be speaking at TechEd 2007

 



I am very excited that I will be presenting at TechEd this year.  I am presenting on Monitoring BizTalk Server with MOM.  The last time that I spoke at TechEd was back in 2000.  I have been a speaker at many other events and enjoy speaking but there is something really enjoyable about speaking at this event.  


If you are going to be there this year, stop by and say hello.


Here is the official info:


SOA307 – Managing and Monitoring Microsoft BizTalk Server Solutions with Microsoft Operations Manager
Track(s): SOA and Web Services
Level: 300
Speaker(s): Stephen Kaufman

Create safe File Name from string using .NET 2.0

Recently for one of my weekend project I wanted to create a safe file name from a string. In the past people used to do lot of regular expressions and conditional testing to meet this requirement. Still the filename won’t be safe across multiple environments (Windows 2000/XP/2003 etc). But with .NET 2.0 using couple of inbuild functions (Path.GetInvalidFileNameChars and Path.GetInvalidPathChars) you can create safe filenames. Hope this piece of code will be useful to someone.

private string CreateValidFileName(string title, string extension)
{
string validFileName = title.Trim();

foreach (char invalChar in Path.GetInvalidFileNameChars())
{
validFileName = validFileName.Replace(invalChar.ToString(), “”);
}
foreach (char invalChar in Path.GetInvalidPathChars())
{
validFileName = validFileName.Replace(invalChar.ToString(), “”);
}

if (validFileName.Length > 160) //safe value threshold is 260
validFileName = validFileName.Remove(156) + “…”

return validFileName + “.” + extension;
}

Nandri!

Saravana