Tuesday, February 28, 2006

Microsoft Announces Windows Vista Versions

Microsoft has announced the different versions that will be offered of its new Windows Operating System expected to be released by the last quarter of 2006. These versions are:

You can click on the links for more details.

My personal choice, well, it depends on where I will be in my career at that time. If things remain as is then I will go for Windows Vista Home Premium. But if things get serious, then I will go for Windows Vista Ultimate.

Now all that is left is that Microsoft announces the pricing for Windows Vista, and that I add an additional 1.5GB of RAM to my laptop (currently running at 512MB).

sk8er boi

Tags: , , ,

Sunday, February 26, 2006

BizTalk: Map a message into another live message instance

Have you ever been in a situation where you needed to get a couple of fields from a message and insert them into another live message in a BizTalk orchestration? I am currently running into the possibility of doing this, so am thinking about my options for doing this.

Now, I could use a custom .NET helper function that will do this for me, or I could use a BizTalk Map with two source schemas and one destination schema to get the desired output. But won't it be cooler if I could just map one message into the other and simply have BizTalk override the desired fields?

To illustrate what I want to see in BizTalk, let's illustrate it using the classic purchase order example. I have the purchaseOrder request message, and I used some of its fields to create a message requesting a manager's approval to complete this transaction. The approval comes in, and let's say that I am interested in getting two fields from the purchaseApproval response message, ManagerId, and ApprovedQuantity. I need to insert these fields in the purcahseOrder message so that I can send it to a different application and have it processed there.

I would love to have the ability to create a BizTalk map to do this. I'll simply create a map that has as its source schema the ApprovalResponse schema and as its destination the PurchaseOrder schema. At the BizTalk orchestration, I will select the purchaseApproval message as the source message instance, and the purchaseOrder message as the destination message instance. In the properties of the transform shape, I will have the option to select one out of many options for the destination message instance: Create New Message Instance, Override Existing Fields, and may be another option (if you can think of one).

Some might argue that you can not risk overriding an existing message instance because it might be used by other BizTalk Orchestrations. Well, I think that when developing a system, you can tell in advance whether this message will be used in multiple concurrent processes or not, if you can't, then you have a problem.

Wich option do you think I should go for?

sk8er boi

Thursday, February 23, 2006

Windows Vista February CTP

Windows Vista and WinFX February CTPs has been released, you can download them form the Windows Vista Developer Center

sk8er boi

Tuesday, February 21, 2006

How dare they?

I just can't imagine how people after all these years still dare to complain about Windows being unstable?

My development machine has been running smoothly for 70 days and counting. I have a P4 3.0GHz, 512MB RAM Windows Server 2003 powered machine. I have Visual Studio 2003, SQL Server 2000 Enterprise Edition, BizTalk Server 2004 Enterprise Edition, AmberPoint Management Foundation, and IBM WebSphere MQ all running on the same Windows development (yeah, development) machine. It is still running perfectly, no memory leaks, no performance issues, no hanging applications, even with my average 4 Visual Studio concurrent running instances.

I am not sure what the record for the longest running Windows development machine is, but I really hope that I won't have to reboot my machine till the end of the year. Hold on, is there a way to install Vista without rebooting? Well, I guess am gonna have to order me a Vista dedicated box ;-)

sk8er boi

P.S. I drafted this post a couple of days ago with a plan to publish it over the next few days, and it looks like I have jinxed my machine. Today, while working on a project, Visual Studio stopped responding, so I closed it. But when I reopened my solution, VS loaded but then exited without any error message, I tried over and over, but no luck. I tried creating a new solution, but when ever I tried to add a project to it, VS exited. I ran VS setup to repair it, and it asked me for a restart! Yeah, a restart, how unlucky! What makes things worse, is that the problem wasn't fixed :( I had to use another machine to do my work.

Monday, February 20, 2006

GacIT

Disclaimer: My geeky side (nor my cool side for that metters) can not be held responsible for any damage that might be caused to your computer or any loss of data that may or may not result after you follow the procedures described in this tech note. This tech note contains steps that might ask you manipulate your machine's settings and/or registry keys, if you choose to follow these instructions then you do so at your own risk.


The other day, we were placing some assemblies in the GAC (Global Assembly Cache) and we just thought: "Isn't there and easier way to place it in the GAC? Drag and Drop is just too much work!" Lazy, can't argue, but that's us ;-)

So I thought: "Why won't we do some thing that will allow us to send an assembly to the GAC by right-clicking it!". Here's how I did it.

Option 1 (Right-click -> Send To - > GacUtil.exe):
1. Go to Start -> Run
2. Type "sendto", this will open the SendTo folder containing the shortcuts that appear on the send to menu when you right click an file
3. Right click the folder and select New -> Shortcut
4. For the location option, enter the path to the gacutil.exe, and add the /i switch at the end
5. Click Next and enter GAC as the name of the shortcu, then finish the wizard

Option 1 works fine if you have the default installation on your machine. But you don't always get gacutil in the same folder? Of course, you can always go and look it up, but there is always another "but" on the way. I would like to have a small script that I can run on every machine that I use to set up a GacIT feature for assemblies. This is why I came up with option 2.

Option 2:
1. For this option, I need to have a small c# app that is only around a dozen lines of code. This app will be responsible for programmatically installing an assembly into the GAC. So open up you Visual Studio and create a new C# console application (call it GacIT) and enter the following code in its main function

static void Main(string[] args)
{
try
{
if (args.Length > 0)
{
System.EnterpriseServices.Internal.Publish gacPublish =
new System.EnterpriseServices.Internal.Publish();

string assemblyPath = args[0];

System.Reflection.Assembly assemblyToGac = System.Reflection.Assembly.LoadFrom(assemblyPath);

if (assemblyToGac.GetName().GetPublicKey().Length > 0)
{
gacPublish.GacInstall(assemblyPath);
}
else
{
throw new Exception("Assembly not signed");
}

System.Windows.Forms.MessageBox.Show("Assembly successfully added to the GAC", "GacIT");
}

}
catch (System.Security.SecurityException ex)
{
System.Windows.Forms.MessageBox.Show("Assembly cannot be added to the GAC. Insufficent Security Permissions." + ex.PermissionType.ToString(), "GacIT");
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show("Assembly cannot be added to the GAC. " + ex.Message, "GacIT");
}
}

P.S. This is .NET 2.0 code and is not supported in previous versions
2. Build the project and get the exe output
3. What we will do now, is to add a new shortcut to the shell menu of the .dll files on the machine. This shortcut will be available when right-clicking all .dll files. To do that, open my favorite app ever, notepad
4. Enter the following registry key information in it

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\dllfile\Shell\GacIT]
@="GacIT"

[HKEY_CLASSES_ROOT\dllfile\Shell\GacIT\Command]
@="E:\\GacIT\\GacIT.exe \"%1\""

P.S. Remember to change the "E:\\GacIT" path to the corresponding path on your machine

5. Save the notepad file as GacIT.reg
6. Now you are ready to add GacIT to your system and any other system that you might use

Now, you can play with this and add whatever feature you might like (i.e. Un-GacIT), or if you like, and you work with COM+ as well, then the Publish class provides the ability to register COM+ applications.

If you need any information on the classes used in the code above, or the Windows Shell and extending it, please drop me a comment below.

sk8er boi

Wednesday, February 15, 2006

Coming out

At last, I have the courage to come out of the closet and announce to the world that I am living a double life. True, I have a secret that I have been trying to hide for so long out of fear that people might not understand. But now, the world has changed and people became more open minded, and every day, more people like me are coming out of the closet. So, I have decided to come out myself. It is true, I am not just this cool, charming, got it all dude, I am also a geek, a techie.

Yeah, it is true. I have a thing about computers, software, am just nuts about programming.

To give you a brief psychological profile about me, I power a Toshiba Tecra A3-205 machinery powered by Windows XP Professional SP2. I have notepad on the top of my most used applications in my start menu on every machine I use. I am a software developer/consultant. My work is focused into integration solutions. I have a relatively short but extensive 2-year experience. I work with .NET, BizTalk 2004, Web Services, MS SQL Server, and AmberPoint Management Foundation. I am currently in love with Windows Vista, Windows Communication Foundation (WCF), Windows Presentation Foundation (WPF), Language Integrated Query (LINQ), and it looks like Windows Workflow Foundation (WWF) is on the way. Through out my career, I have come into touch with non-Microsoft prodcuts; mainly IBM WebSphere MQ, IBM MQ Workflow, AmberPoint Management Foundation, and IBM Mainframes.


I am a Microsoft fanatic. So, this blog will mainly talk about Microsoft technologies, but if I pass by a non-Microsoft noteworthy technology or product, you bet I will be objective enough to give it the credit it deserves.

I will probalbly be talking about Vista, WCF, WPF, BizTalk, XML, Web Services, and SOA in this blog. I will try to bring you interesting topics on timely basis. And if you ever want me to talk about some thing or got a question to ask, then please let me know.

I will have my first tech note soon so please stay tuned, and thanks for stopping by to get to learn a bit about my geeky side.

P.S. For more information about my cool side, you can always stop by my other place.

sk8er boi