Infosys Microsoft Alliance and Solutions blog

« October 2006 | Main | December 2006 »

November 30, 2006

BizTalk Server 2006 on Vista RTM

I had earlier blogged about my attempts to get BizTalk Server 2006 working on Vista RC1. I recently downloaded and upgraded to Vista RTM and after getting some other things out of the way, I finally found time to try out installing BizTalk Server 2006 on Vista RTM.

Having read in couple of posts about the "Run as Administrator" requirement to run certain software, I decided to run all setup programs and configurations wizards in that mode. Here is how it all went.

With Vista, VS 2005 Team Suite and SQL Server 2005 Standard Edition all installed and configured properly, I then started with BizTalk Server 2006 Developer edition setup. During setup BizTalk offers to automatically download and install the pre-requisites from the CAB file. Since in my earlier attempt i had used the XP cab file, I decided to use the auto-download option this time to see what happens. The setup program tried to download some cab file. I waited for about 5 mins, but didn't see any activity happening. It didn't report any error nor did it show any progress update.

Deciding not to wait further, I cancelled the setup and restarted again and this time pointed to my pre-downloaded XP specific cab file. I didn't try the Windows2003 specific cab file, since that is a server platform. To keep things simple, I didn't select EDI Adapter, no portal components and no single sign-on features. I did select Business Rules Engine though. The setup proceeded normally and completed without any errors. During setup, it did show a dialog about VS 2005 compatibility issues on Vista, but I select "run program" option and went ahead.

But this much had happened last time also. Post this, I then started the Configuration wizard (with run as administrator). Again without attempting anything fancy, I selected the basic configuration and provided a local user ID/pwd that I had created earlier (and made part of Administrator group) and went ahead. To my delight the configuration also completed successfully and I started feeling more confident about a successful execution this time.

I ran the BizTalk Server Administration tool and was able to navigate to various items without issues. During my last attempt, when trying to access an adapter I had got WMI error. This time, I was able to access all adapters without any errors. Having disabled user access control (UAC) feature already, I then proceeded to pick a sample from SDK and configure it so that I could test a running application. I picked up CBRSample from <installdir>\SDK\Samples\Messaging (no particular reason for using this application) and ran the setup.bat file.

If you have been reading my earlier blog, you would know that i had again faced some errors here related to UAC and also WMI. Since I had already disabled UAC, there was no errors for directory creation and the setup.bat file ran successfully. Like setup, I again got a compatibility warning for VS 2005, but again I went ahead with "run program" option. I was almost there. With the application successfully configured and started, I knew that it will work fine this time.

I picked up the sample files provided with the CBRSample and placed them in the IN folder. A small wait (typically required for the receive location to poll again) and the files disappeared. However more wait, but the files never appeared in the output folder. Was something wrong with the setup again !

Via BizTalk Adminstration console, I found out that two service instances in resumable state. So this was still good news. The error stated no active subscription was found and little more investigation showed that the send ports didn't had the filter set. This was pretty simple to resolve and I added the appropriate filter as below. This behavior is also documented in the BizTalk's documentation.

CBRSample.CountryCode == 100 (for US)
and
CBRSample.CountryCode == 200 (for CAN)

I then resumed the suspended services and the messages were picked up by appropriate send ports and the output files appeared in their respective locations. To ensure that all was well, I picked up another sample from SDK - <installdir>\SDK\Samples\Orchestrations\CallOrchestration and ran setup for this. This again was installed and configured without issues. The sample file from the In folder was picked up and i saw a file in the Out folder as expected.

The only small issue was that this sample didn't create a custom Application in BizTalk and got added to BizTalk Application 1, the default application. I haven't checked all the samples, so not sure which others use or not use the application feature. It would be good if all samples use the new Application feature of BizTalk since it really makes working with the various artifacts related to an application simple.

Finally to summarize, Biztalk Server 2006 runs successfully on Vista RTM

Application Thumbnails in Vista

I have been using Vista for a while now (started with RC1 and upgraded to RTM recently). One of the things that one notices immediately is the cool new graphics capabilities that Vista offers. I am amazed by looking at the new set of icons also being used for various applications and the transparency that the windows now offer.

Another interesing feature is the application thumbnails that you see when you do ALT + TAB or hover the mouse over applications in the task bar. If you notice carefully these aren't static images but live previews of the application. So as the application state changes, the thumbnail updates accordingly. One simple way to verify this is the run some setup program and then watch the thumbnail by hovering the mouse over the taskbar button for that application.

I was hence interested to find out if this feature is something that we can use in our applications and it turns out that we can. This new feature is essentially by virtue of the new Desktop Windows Manager, a new component in Vista. Refer to this blog by Greg Schechter for a good overview. Read the online documentation to get insight into this new API set and how it works. You can check the Thumbnail overview for more details on that.

I also found a cool sample code on Channel 9 Forums by Sven Groot. I downloaded and used it on my Vista RTM machine and got a "stack has become unstable error". It pointed to the DwmRegisterThumbnail API to be reason for the problem. A quick look at the API signature in the online documentation showed the difference and I made changes to the NativeMethods.cs file accordingly. The size parameter is no longer used. You can edit the NativeMethods.cs file to alter the signature as below and the code should work just fine.

File NativeMethods.cs:

[DllImport("dwmapi.dll")]
public static extern int DwmRegisterThumbnail(IntPtr hwndDestination, IntPtr hwndSource, out SafeThumbnailHandle phThumbnailId);

Some more implementation samples are mentioned in this another blog post by Greg.

So go ahead, start playing around with this new API set!

November 24, 2006

Visual Studio 2005 and SQL 2005 on Vista RTM

I recently upgraded to Vista RTM and installed VS 2005 and SQL 2005 on it. While running VS2005 I kept getting a message box saying that this program has known compatibility issues with Vista. Checking online, I found this blog entry. Going to the connect.microsoft.com site, I realized that the VS2005 SP 1 Beta program is already over but the SP1 is available for download here. Downloading and installing it caused the warning to go away. I quickly built a WF application to test that it was funtioning alright.

Next I attacked SQL 2005. As per documentation this needs SP2 to run on Vista. I hence downloaded and installed SP2. I had earlier tried configuring SQL and the only thing that had given trouble was Reporting Services. Since the documentation on VS2005 talked about running it as Adminstrator, I decided to run Reporting Services Configuration tool as Administrator. During configuration I ran into issues related to managed pipeline mode setting. The Default web site that runs under the DefaultAppPool runs under Integrated setting, while reporting services needs the Classic mode. So I created a new web site and marked it to run under Classic .Net AppPool and then configured the virtual server and directories for the Reporting services on this new web site. One point to note is avoid enabling "Apply Default Settings" since this causes the application pool to be reset to DefaultAppPool and this causes runtime error due to managed pipeline mode setting.

With all this done, I was finally able to get VS2005 and SQL 2005 along with Reporting Services to run successfully on Vista RTM.

29 Nov 2006: A point to note however is that you need to evaluate the need for SP for your usage. Like VS 2005 SP is required when working with Smart devices or some specific C++ programming. Usually running VS 2005 or SQL 2005 as Administrator will still provide basic functionality on Vista, which should be sufficient for normal usage.

November 17, 2006

BizTalk BRE - Is it true Business Users Rules Engine?

I have been working with BizTalk for a while now and one question that I always have for the BizTalk's Business Rules Engine (BRE) is, is this really a true business user's tool? My take is, it is not and probably that is why it is called Business rules engine and not Business Users Rules Engine !

Without really getting into comparison with other Rules based tools available out there, I want to focus more on what a business user will want and does BRE offers all that. The primary need for business users if obviously to be able to create, edit, delete rules. Once a rule is created they may also want to temporarily disable the rule for some duration. While BRE, does offers these features, it is the way in which they are offered that makes it more of a developer tool than a business user tool. Lets take a few key features of BRE and discuss about them below.

Vocabularies, that make building rules easier, is a great feature to have. But vocabularies can't really be created by business users easily. They will need to be built by a developer who know the various .net components, their get/set methods, know the XML schemas and understand them, know the DB schemas and know which table/column to look for, for the data etc. Given that someone has built these vocabularies, a business user might be able to create policies with them.

This brings us to the policy creation editor. Business users with some training can probably make use of this to build the necessary rules. However things that make it complex are the right XPATHs, priorities of rules execution, agenda updates, assertions etc . Additionally, vocabularies once built and deployed become immutable and hence making changes to them becomes difficult. Refer to my earlier blog where I had talked about one way of doing this.

Consider a business case where say discounts are being offered based on seasons. Everytime the season changes, the discounts need to be changed to the one applicable for that season. A business user will be more interested in say enabling the season specific discount and disable other or be able to quickly modify the % discount and reapply the rule.

If we take the case of enable/disable, in BRE perspective, this could mean a different policy for each season, but this has issues since the calling orchestartion will need to be modified everytime a particular policy needs to be disabled and another enabled. This could be handled via another wrapper policy that calls the right policy internally. See policy chaining sample here. We also selectively enable disable different versions of the same policy.

For the other option of modifying just the %, it isn't straighforward in BRE and would typically mean creating and deploying new versions. Versions is a concept that works well with developers, but not with business users. With my own OOP development background, I am used to base class and inherited class and inherited class having similar features as base class and it can extend them further. Though versioning in BRE isn't a direct parallel, but consider why would someone create a new policy version. Since policies once published are immutable, to make any changes to them, one needs to have new versions. One can argue that the need could also be to write new rules, but then why reuse the same policy name. I would typically create a new policy for writing new rules and work with new sets of facts and vocabularies, possibly.

So given that I create new version for rule updates, it is surprising that this isn't the default behavior of BRE. When I create a new version for a policy, it is blank and I need to explicitly copy and paste old rules to it and then start modifying it. My take is that this should have been the default behavior.

Things aren't all bad also. With a little tweaking and thought, one can build upon BRE to meet some of the needs. I earlier used an example of enable/disable season based policy. One way this can be done is as below

1. Start by creating a policy (along with necessary vocabularies) for a particular season and set appropriate discount %.
2. Save and Publish this.
3. Create a new version and change the discount % as appropriate for another season.
4. Repeat the steps till you create as many versions as you want for the various seasonal discounts.

Now based on the current season, you can deploy a particular version and undeploy another. It is definitely possible to undeploy version 1.4 and deploy and earlier 1.1 version via BRE. The tricky part is that the identification will have to be done based on version 1.0, 1.1 etc, which is not that business user friendly representation. Since BRE can be invoked via custom code, you can display these versions using more meaningful names in your custom application and business users can then easily enable/disable usign more meaningful names like Autumn, Spring, Winter etc. Code like following is what you use to query the Rule store and deploy/undeploy specific versions. In the code these will be using explicit version numbers, but on the UI, you can show more user friendly names.

            RuleSetDeploymentDriver dd = new RuleSetDeploymentDriver();

            RuleStore sql = dd.GetRuleStore();

            RuleSetInfoCollection rlColl = new RuleSetInfoCollection();
            rlColl = sql.GetRuleSets("MyPolicy", RuleStore.Filter.All);
            foreach (RuleSetInfo rs in rlColl)
            {
                if ((rs.MajorRevision == 1) && (rs.MinorRevision == 2))
                {
                    dd.Undeploy(rs);
                }
               
                if ((rs.MajorRevision == 1) && (rs.MinorRevision == 1))
                {
                    dd.Deploy(rs);
                }
            }

If you are wondering which RuleSetDeploymentDriver to use, since there are two of them available, check this. Additionally there are tools available to work with BRE from third party like Policy Verificator and now the newer version, which is currently in beta, called Business Rules Manager.
 

Vista RTM

Vista RTM is now available for MSDN susbribers to download online and I am currently downloading it. The current reading shows it will take another 4 hrs for it to complete. Can't wait to upgrade my current RC1 to RTM and make this my OS to work on. What ever little I have worked with RC1, I am amazed by the great new UI support that it offers.

Note that UI isn't the only new thing coming with Vista. It has .net fwk 3.0, IE 7, IIS 7, user access control (UAC) and all that good stuff. One point against UAC is that it seems to support only dual modes - ON or OFF. I would have liked it to support some middle path also.

November 14, 2006

Office 2007 and OneNote 2007

Just finished downloading and installing these new products (from MSDN subscriber downloads). Automatic upgrade to newer version is supported, but it won't work if you have any pre-release versions installed. I had the beta Compatability pack for Office 2007 file formats installed, which I had to uninstall to get the automatic upgrade working.

My initial reaction is "wow". Go ahead download and try it out yourself. Along with Office suite of products, even OneNote has added lot of new features. If you aren't already using, give it a try.

November 9, 2006

Alpha, Beta, CTP, RC, RTM - Is this good?

Till before the start of the current millennium, we were accustomed to working with release versions of the software. People were either not aware of all these various pre-release versions, or they were not even available from the vendor. I can recall having worked with MSVC 1.5, 2.0, 4.0, etc and always working with the release versions only. We would read documentation, if available, on new features being planned to be introduced in newer versions or many times it was some dedicated time spent post release of the product to understand the new functionalities available.

However with .net, MS has changed all that. Initially it was Beta bits that would be available for people to download and work with and specific partners would get a pre-beta version also to work with. General public hardly ever (apart from beta testers) got involved in using these pre-release versions. Now, we have not only betas, but regular CTPs (almost every month in some cases) and various RCs prior to the final release.

I feel that in a way it was good earlier, since we were not getting worried about compatibility issues of pre-release software, upgrade issues between various betas and CTPs, changing API names, features missing from final release build that we have already worked with during earlier bits. The typical time frame between a public beta and the final release of the product these days is anywhere upwards of 1 year. During an year lot of work happens on the product to make it release ready and this would include bug fixes, API name changes, addition of features, improving stability of features and even removal of features that are probably too ambitious to be completed within the planned release time frame.

However with the people now getting involved in betas, CTPs and RC builds, they get their hands dirty on the product much ahead of the actual release and this brings in additional issues of upgrade issues, newer bits don't install or work properly without clean un-install of earlier bits etc etc.

Having access to these early bits has a brighter side also. It allows us to experiment with upcoming technology and plan our own application development around it. If we know a new technology is about to be released and will have features that will make development of our planned application easier, it may be worth to wait a little for the release of the technology or get into TAP program with MS. More and more organizations these days start working with beta bits itself for their applications.

In a way this helps MS also. In general it is 1-2 yrs post release of a software that people really start using it. With the early bits now available, this people acceptance has come down drastically and many would be already building production systems and release them along the same time as RTM of the software. This mean faster product acceptance into the market.

So though having access to early bits is good for understanding what's coming in future and plan our own technology road map around it, it has also opened new challenges for the developer community in continuously having to learn and cope up with new versions of pre-release software.

I wonder what it would be like if the monthly CTPs that we have today, become daily CTPs in future ! Your comments are welcome.

November 3, 2006

BizTalk 2006 on Vista RC1

I recently installed Vista RC 1 and decided to give a try to installing and working with BizTalk 2006 on it. I am still trying to get it to work. Here are the details of what I have done so far.

Post Vista RC1 setup, which went off smoothly (I took the fresh install option than upgarde), I installed VS2005 and Office components. Then went on with SQL 2005 Standard Edition. During the initial machine configuration check SQL pointed out that IIS isn't installed. Since VS2005 now supports its own web server to run and test the ASP.NET applications on, it no longer prompts for IIS setup as VS2003 used to do.

Anyway, post IIS 7.0 setup (that's what we get on Vista), I went back to SQL setup and it still said that IIS isn't installed. This wasn't really a road block for me for trying out BizTalk setup, but I wanted to have SQL Reporting Services also working since one of the projects I am currently workings uses that feature along with BizTalk.

A little search on the net (it is amazing ! you can find almost anything on net) and I found the reason for SQL not detecting IIS. Check this MS support KB. Ensuring that I added these additional IIS features, I once again tried SQL setup and this time it detected IIS and all went off well.

Then I started with BizTalk 2006 Developer edition setup and it asked for installing the prerequisites via a CAB file. Considering Vista is another workstation OS and not a server platform, I decided to use the same CAB file that I had used for XP. You can download the cab file from here.

BizTalk setup and basic configuration went of smoothly and without further delay, I decided to deploy an application from SDK samples and get going. I started with the CBRSample application in SDK\Samples\Messaging folder. When I ran setup.bat, I got quite a few access denied. First one was while trying to create the required input/output folders and the second one was for SQL login failing using windows authentication.

The first error of directory creation was happening due to the new features in Vista called User Access Control. You can disable this via control panel (user accounts) and things will work fine. I disabled it to get my setup file to work. You should read more about this, prior to disabling this, here.

The next I had to tackle SQL login issues. This was surprising since during installation I had selected the mixed mode authentication option hence my windows login should have worked. Something wasn't right. I tried to play around with the configuration wizard to update the network and client configurations, but nothing seemed to really help.

For some reason at this time, I suddenly realized that I didn't had anti virus installed. Note that it would affect my SQL login, but nevertheless, this was important. So I installed the anti virus software, restarted the machine and now surprisingly I could logon on to SQL Server. I had found a similar issue being described here, but for me, I didn't had to create a login for myself separately.

At this time I felt that all was well and I can go ahead and complete the setup, but there  were more things in store for me. The setup could now create the directories, it could even build and deploy the BizTalk assemblies, and create the send and receive ports. However as a final step when I tried to use WMI to start the ports, it failed giving following error

A connection with the transaction manager was lost. (Exception from HRESULT: 0x8004D01C)(HRESULT: 0x8004D01C). This was strange. So I thought since it has already created the necessary ports, let me directly try to enable these via BizTalk Admin console. However when I tried to view adapters, or refresh the group hub page, I got the same error about connection with the transaction manager was lost. It looks like the WMI provider that BizTalk 2006 is built to work with, isn't compatible with what is available in Vista.

Let me explore further and I will update this blog as soon as I find more information. First thing I will be now trying is install SQL 2005 SP1 and see if that makes a difference. If anyone has got this working and has any suggestions, do pass them along.

Updated: 8th November. I tried with SQL 2005 SP1, but with no success. I continue to get the same errors and it points to WinMgmt. I guess I will have to wait for Vista RTM. With the release of .net fwk 3.0 and Vista RTM announced, it should be just a little more time before I can try this out. Will update this blog shortly.

 

Subscribe to this blog's feed

Follow us on

Blogger Profiles

Infosys on Twitter