Infosys Microsoft Alliance and Solutions blog

Main

May 14, 2008

Office 2007 - Word has stopped working !

Yesterday while trying to open a DOCX file, my Word started to crash. Everytime I would open, i will get a message saying "Word has stopped working". However i tried to open the document, this kept on happening. Checking event log took me no closer to the issue

The message was "Faulting application WINWORD.EXE, version 12.0.6211.1000, time stamp 0x46d4a7df, faulting module wwlib.dll, version 12.0.6212.1000, time stamp 0x46e03d42, exception code 0xc0000005, fault offset 0x000210c6, process id 0x1738, application start time 0x01c8b579a153ac6b." with an EventID of 1000

Continue reading "Office 2007 - Word has stopped working !" »

May 13, 2008

WPF Label or TextBlock

Pre WPF days just had a Label control and hence there wasn't really a choice. Now in WPF you have Label and a new TextBlock control. I have been wondering on usually which one to use in the application when i hit upon this interesting comparison between the two by Josh. There is one additional difference mentioned in comments down below on that blog that talk about auto inversion of colors for TextBlock if it is part of say a ListItem. However to me it looked more like setting the Foreground to white, since when i tried with styling the item selection color to something else, the TextBlock still showed white color.

Honestly I am now left more confused. TextBlock is light weight and hence good from app performance perspective, but Label gives the access key functionality, something that people prefer to have in their applications. It will be really good to have this functionality extended to TextBlock.

What is it that you use in your applications and why? Comments welcome. 

May 08, 2008

Windows XP SP3

New Service Pack - SP3 is now available for Windows XP. You can download it from here. Also note that you can also install SP3 from Windows Update.

If you are one of those who have already been working with IE 8 Beta, then you will need to uninstall it before installing SP3. Check more details on SP3's behavior with various IE versions here.  

April 28, 2008

WPF ObjectDataProvider vs Direct Object Use

When using object instances in XAML, there are two ways to use them. One is to directly create them as resources, assign and key and use where ever required and other is to embed them inside of ObjectDataProvider and then use.

I have worked with both ways and was curious to know the differences between the two and benefit of using one approach over another. I can across this old blog by Beatriz that explain this very well. Along same lines, here is some discussion on XmlDataProvider as well.

April 17, 2008

WPF makes Designers and Developers friends again

I have been playing around with WPF for a while and have been blogging about some of the technical aspects on it. However today I will like to touch upon another important aspect of WPF and that is designer-developer connect.

Having worked on Windows Programming using C++, MFC etc for a decade and working with the various controls, it is a real pleasure to see the capabilities now available to WPF developers. It is true to a large extent that with WPF and XAML and the tools like Expression Blend, designers and developers can work lot more closely than ever before. The working closely is more towards the ability for designers to style the UI for the WPF application and the developers to write the code for it.

Continue reading "WPF makes Designers and Developers friends again" »

April 11, 2008

WPF Data Binding

WPF data binding a very effective way to bind .net CLR objects to WPF UI controls and ensure appropriate updates (by proper use of binding mode and property change notifications). However it can become a bit tricky if not used properly. I recently found these interesting 10 points about WPF data binding. I am sure you would find them helpful as well.

April 10, 2008

WPF - Passing string to ConverterParameter

There are enough online sources that talk about how to buid and use custom Converters in WPF and also how to pass parameters to these converters. However for some reason, all these examples tend to either use a single integer or a single word string. So recently when I had a need for passing a sentence as parameter, I was confused.

Fortunately the simple trick of using single quotes inside of double quotes to provide strings worked in this case as well. Following are two ways you can pass a string that has multiple words to a converter.

Continue reading "WPF - Passing string to ConverterParameter" »

April 04, 2008

WPF - Binding to Image Control

Overtime, I have used different approaches to binding pictures to Image control in a WPF application. I have seen various questions on the WPF forum as well on this topic. The information is all available out there, but scattered. Hence, I decided to create a sample application to demostrate the various scenarios that can exist when you need to use the Image control to display pictures.

Continue reading "WPF - Binding to Image Control" »

April 03, 2008

ASP.NET AJAX Perils

ASP.NET AJAX is come a long way since its inception a few years back and my personal take it is that it in a hype cycle right now, where everyone is trying to jump on-board and create AJAX based applications. Needless to say that it has its own benefits, but there definite downsides to it as well. You can read a set of 10 important aspects around AJAX here.

It is known that though it gives a flicker free UX, the under-the-hood story tells a different tale. Having read about it, some days back, we did a small experiment to really see the kind of differences one can get with different approaches and you can read about our findings in this report (Download file). The scenario we took is very simplistic, but the results are still eye-opening.

March 26, 2008

WPF - Updating XmlDataProvider when source XML changes

Some days back i had answered a question on the WPF Forum on how to ensure that when the base XML file changes, the XmlDataProvider is udpated and hence the bound control on the UI.

The key is to set a watch on the particular XML file for changes and then update the provider appropriately. See details here. This solution works fine, but I didn't particularly like my initial code that I wrote since the FileSystemWatcher was set externally. It would be better if this could be self contained within the XmlDataProvider itself.  

Continue reading "WPF - Updating XmlDataProvider when source XML changes" »

March 12, 2008

WPF TextBox Memory Issue

Some days back, I had blogged about this issue and suggested how to set global style to counter this. However it turns out that with that you may run into 'Cannot use UndoService while it is disabled' related error. To address that, you will need to modify the style using a DataTrigger as below.

        <Style TargetType="{x:Type TextBox}">

            <Style.Triggers>

                <DataTrigger Binding="{Binding Path=IsLoaded, RelativeSource={RelativeSource Self}}" Value="True">

                    <Setter Property="UndoLimit" Value="0" />

                </DataTrigger>

            </Style.Triggers>

        </Style>

MS has accepted the behavior behind this as a bug. Read more discussion on this here.

March 10, 2008

WPF XmlDataProvider, Working with External XML Files

Recently on the WPF Forum I came across an interesting problem about use of XmlDataProvider in XAML and its ability to load external XML files. It took a bit of a struggle, but eventually I did manage to get it working. Here I will try and explain it in some detail so that others can also benefit.

We all know that one can easily bind to inline XML in XAML or can load that from external file. If working with inline XML, you usually use XData to specify the XML file content.

Continue reading "WPF XmlDataProvider, Working with External XML Files" »

March 06, 2008

Expression Blend 2.5 still has some issues with Globalization

Last week I had blogged about an issue with Expression Blend Dec 2007 Preview when working with Globalization and Localization. Yesterday at MIX 2008 Microsoft has launched Expression Blend 2.5 March 2008 Preview along with SilverLight 2.0 Beta. For a list of all the products announced during MIX check here.

With the new version of Expression Blend available, I went ahead and upgraded my machine with it and decided to give it a shot for the Globalization issue I had faced earlier.

Continue reading "Expression Blend 2.5 still has some issues with Globalization" »

March 01, 2008

WPF - TextBox memory leak issue

Earlier today on the WPF Forum I hit upon this issue about memory leak in TextBox. MS has responded saying it is by design. I am not entirely convinced as to how consuming unlimited memory could be a good design decision. I have been using WPF for a while now and wasn't even aware of this property on TextBox. I am sure many others won't be.

Anyway, the solution discussed there is to set the UndoLimit property of TextBox to 0. Instead of setting this for all TextBoxes in your code, it can more easily set in App.xaml as an application resource so that it is applicable to all TextBoxes by default. You can explicitly undo for specific ones via code or local property setting.

    <Application.Resources>  
        <Style TargetType="{x:Type TextBox}"> 
            <Setter Property="UndoLimit" Value="0" /> 
        </Style> 
    </Application.Resources>

February 29, 2008

Expression Blend issue with Globalized WPF Application

Recently while supporting a project on converting their WPF application for globalization and localization support, we faced an issue in being able to work with Expression Blend 2 Dec preview. We used the recommended approach for globalization and localization and after doing all that Expression Blend failed to load the user controls in design view.

You would get an error like this - "MissingSatelliteAssemblyException: The satellite asembly named yourassemblyname for fallback culture 'en-US' either could not be found or could no be loaded. This is generally a setup problem. Please consider reisntalling or repariring the application."

Continue reading "Expression Blend issue with Globalized WPF Application" »

February 28, 2008

Common platform for building SOA and distributed Microsoft based applications

Microsoft is trying to regain ground in the SOA space. today the challenges that an enterprise
faces when building SOA based applications are the huge effort required to design, build, deploy and manage these SOA based applications. Microsoft has huge range of products like Windows
communication Foundation(WCF),BizTalk Server and other emerging technolgies like Silverlight
and Biztalk services for Supporting SOA development but that is not sufficient, there should
be techniques which will make building these applications simpler. Modelling is identifed as
one of the main areas which needs be covered as part of the application development. Models
are used by everyone in the team during the project life cycle.The business analyst use it
during the requirement and process documentation. The architects create models for schemas,
Services and high level design, developers create models for rules and workflows.
The issue here is each of these models are in silos. Each team members uses his own tool and
framework for modelling which creates communication barrier and these model live in isolation
and there is no end to end solution view of the entire application from the view of business,
architects and developers of the application. This is where i feel the next version of application
platfrom product will provide a unfied view and and common platform for building SOA and distributed based applications which is named as "OSLO" by Mircosoft.

 

 

 

 

Continue reading "Common platform for building SOA and distributed Microsoft based applications" »

February 24, 2008

Silverlight 2.0 Tutorials released

The wait for developing some really fantastic and rich web applications is likely to end soon. Excited Developers have their fingers crossed for the release of Silverlight 2.0. You can get a feel of building Silverlight 2.0 applications on Scott Guthrie's Blog. He has posted a few basic tutorials on this, though the software is not yet released. If you are a WPF developer, you are absolutely ready for the ride.

Keep watching this space for more!

 

February 22, 2008

Microsoft interoperability principles

MS has published far reaching interoperability pinciples. Check the interoperability principles at http://www.microsoft.com/interop/principles/default.mspx

These principles touch all high volume products ( operating systems (server and desktop), Database(SQL 2008), Office 2007, Exchange 2007, MOSS 2007 and future version of these products).

Broadly principles are
1. open connections to MS products through open protocols, open APIs etc.,
2. Support for standards
3. Data Portability through support of open formats
4. Open Engagement with customers, open source and industry

Looks like MS is promising one more time that it is moving towards "openness" in their products and technologies. There were many promises earlier but this is the first time principles are enunciated in such a clear manner.

May be it is a narrow prism to see this announcement but coming just before the ISO ballot resultion meeting from Feb 25 th to 29th to decide on Open XML raises few hackles.

Interestingly Ray Ozzie calls it as "very important strategic shift for every engineer at MS". It would be interesting to see how this promise would translate into implementation in the products.

- What do you think why MS is trying to be more open than it was before?

- Why it has to assure the community about its commitment to "openness"?

- Distinction between interoperability and "openness" as seen from this announcement?

- Does this mean Open source developers wont be sued who extend MS products?

- Does openness make MS products more vulnerable? build bridges and then later on replace with competing products?

- What are the implications of Reasoable and Non Discriminatory (RAND) license means?

What do you think. Let me know your opinion.

 

February 16, 2008

Silverlight - Dynamic Languages

Microsoft has announced that Silverlight applications can be built using dynamic languages such as IronPython, IronRuby and Managed JScript. It's something really interesting because it provides an opportunity for the developers of any of these languages to build exciting Silverlight Applications.

Continue reading "Silverlight - Dynamic Languages" »

February 14, 2008

Debugging WPF Databinding errors

For an application I was working on recently, I had a tough time with debugging some of the data binding issues. Then I came across this excellent blog. My personal favorite is the new Trace Level feature of .NET 3.5. For some reason, I could not get the second option to work.

February 04, 2008

Are Remote MSMQ Queues Reliable?

I have played around a bit with MSMQ private queues and documented some of my findings earlier. In my first blog on this topic, I had captured how the naming of the queue is critical to connect to the right queue.

If it was local private queue, you could use - ".\\private$\\queuename"

and if it was remote private queue, you use - "FormatName:Direct=OS:machinename\\private$\\queuename"

Continue reading "Are Remote MSMQ Queues Reliable?" »

January 31, 2008

Working with MSMQ Journal Queues

In one of our internal forums, recently, someone had posted a query regarding issues in connecting and receiving messages from journal queues. The exception they were getting was "Queue ID is not registered in DS". I hadn't worked with Journal queues before, but this error seemed to me to be related to the queue path.

In my earlier blogs (here and here), I had discussed about the importance of specifying the right name for the queue and also mentioned how the path will typically look like. I decided to give it a try and created a private queue on my local machine and enabled journaling on it. Enabling journaling is as trivial as checking a checkbox in the queue property window.  You can also enable it by setting the UseJournalQueue property on the message.

Continue reading "Working with MSMQ Journal Queues" »

January 28, 2008

Custom User Input Validation in WPF

Building any application that works with User Input cannot be complete usually without having some sort of validations for the input values. WPF is no exception. There is an interesting discussion around WPF validation on Paul Stovell's blog

Martin Bennedik has written a WPF Validation Block over Microsoft's Enterprise Library 3.0. WPF 3.5 also brings in additional validation support via the IDataEffortInfo Interface.

Continue reading "Custom User Input Validation in WPF" »

January 24, 2008

Importance of Application.DoEvents

Recently a colleague of mine shared a code that he was working on where he was playing around with Asynch ADO.NET. He had a simple WinForm application. On the click of a button, he was making calls to the DB to get data. To try out the asynch features, he had introduced delays in the code.

Continue reading "Importance of Application.DoEvents" »

January 23, 2008

Unit Test Trust Issue on Vista

Further to my unit testing experiments that I have been blogging about in the last few days, I was playing around with the DashCommerce starter kit. After installing and configuring the site, I started by creating some tests for the code in the App_code folder.

The test creation was successful and I was all set to run. But luck was against me and I got compilation errors regarding missing namespace. As I had mentioned in my earlier blog, the testing happens via private accessor and since its creation happened successfully, ideally I shouldn't  have had a need for adding explicit references and namespaces to my test project.

Continue reading "Unit Test Trust Issue on Vista" »

January 22, 2008

Debugging ASP.NET Unit Tests with VS 2008

In my previous blogs (here and here), I have been discussing about unit testing on an ASP.NET web site that is hosted on IIS. While doing the work on that, I also had a need to debug my test case. The documentation on MSDN talks about putting break points and attaching to w3wp process and then debug the tests.

This however didn't work for me on VS 2008. What worked was adding the System.Diagnostics.Debugger.Break() call in my code and then running the tests like normal. When the code hit the Debugger.Break line, it asked me, which debugger to use and I selected the already open VS 2008 instance and it took me to the correct line of code and i was able to debug.

January 21, 2008

ASP.NET Unit Testing on IIS

In my previous blog I had mentioned about the issue in generating private accessors for ASP.NET code that is hosted on IIS. Does this mean that we can't test the web site if hosted on IIS?

You can, but it will be a bit more complex and you may not be able to cover all scenarios. The idea is to work with the PrivateObject that is available from the test context. In the previous blog, I had talked about a web site with a Calculator class in the App_Code folder that i wanted to test. Let's continue with the same example.

Continue reading "ASP.NET Unit Testing on IIS" »

January 18, 2008

ASP.NET Unit Testing issue on IIS with VS 2008

I was recently trying to dirty my hands on using the Unit test framework that comes with Visual Studio. I decided to give it a try on my newly installed VS 2008. I created a pretty trivial ASP.NET site hosted on IIS with a Calculator class that I put in App_Code folder and generated the tests.

One of the key differences in working with Unit test framework for ASP.NET as compared to other projects like Winform or Class library is that the code in ASP.NET gets compiled dynamicall into various assemblies and hence we can't bind to a specific assembly upfront. Check more details on this here.

Continue reading "ASP.NET Unit Testing issue on IIS with VS 2008" »

January 02, 2008

Querying user details from Active Directory

During a recent project, we had need for querying and working with Active Directory. Searching on net, gave lots of help, but most were around creating and managing users. Our need was simple - to get some user specific details from AD.

The trickest part of working with AD is the AD structure and what properties have been defined and hence available for querying. Without really knowing this, one can continue to grop in dark for long hours without much success.

Continue reading "Querying user details from Active Directory" »

December 12, 2007

BizTalk Server and WCF Integration

BizTalk 2006 R2 provides in-built support to access and work with WCF based services. To get more detailed understanding of BizTalk Server 2006 R2, you may want to read "Introducing Microsoft BizTalk Server 2006 R2". In case you want to work with the WCF LOB Adapter SDK, you can get it here.

However you may still be using BizTalk Server 2004 or even the pre-R2 BizTalk Server 2006 version and may still want to work with WCF. In this article, we have provided details on how to go about doing it. Comments about the article are welcome !

AJAX on MOSS

We have working on getting AJAX to work on MOSS with a few tweaks here and there. We knew that this wasn't officially supported and there were still a few unresolved issues like Expander control and the !DOCTYPE tag.

However with the release of MOSS SP1, ASP.NET AJAX is now officially supported on MOSS. I am currently in the process of downloading the same and can't wait to try AJAX on MOSS. Hoping that all issues would have been resolved and we will no longer need to do our custom tweaks to get AJAX to work on MOSS.

November 30, 2007

Silverlight 2.0

I have been playing around with Silverlight for a while now and like all, have been eagerly waiting to get some out-of-box controls that will ease the development effort.

It is good to hear that Silverlight 2.0 will contain a good initial set of controls. The beta of this new version is expected around Q1 2008 and there is lot of speculation that RTM will be around June/July 2008.

November 20, 2007

Visual Studio 2008 Available

The must awaited Visual Studio 2008 is now available. Those who have MSDN subscriber download access, can download it from here. You can directly download the trial version from the home page itself. More details around this can be found here. In case you are facing issues in uninstalling the old Beta version and installing the new version, check here.

I am however facing issues with the new download manager. I keep getting network connection error. I will keep checking this up as I want to quickly download and start using this version of Visual Studio.

[Edited:22 Nov 2007] Full version of VS 2008 Professional Edition is available on MSDN subscriber downloads now.

November 15, 2007

Removing SmartParts from a WorkItem

A common and perhaps a little painful problem while working in CUIB (using SCSF) is disposing the smart parts from a WorkItem. If smart parts are not disposed properly one may get an exception like "Cannot access the object in its current state" and in cases where we are using TabWorkspace it is often difficult to predict the behavior.

Continue reading "Removing SmartParts from a WorkItem" »

November 12, 2007

Visual Studio 2008 RTM

Visual Studio 2008 is expected to RTM later this month. It should be available on MSDN Subscriber download, but the general off-the-shelf availability is still early next year.

November 01, 2007

It is Today - 1st Nov 2007

You would be aware of the expiring of VS 2008 Beta 2 VPCs today. If you have watching the VS Developer Center, you would have noticed the new updates on this. Jeff has mentioned in his blog about what happens with the existing VPC and mentions the 3 alternatives going forward

  • Upgrade the base OS with valid license
  • download the newly published VPC images from here
  • continue to work with the existing VPC and keep rebooting every 1-2 hrs.

Since downloading the 8 files, required for the VPC (not including the base image), took quite a bit of time for me, I will continue to use the existing VPC as is, as I can live with the reboot requirements for now.

October 29, 2007

VS 2008 Beta 2 VPC Expiring on 1st Nov 2007

If you have been playing around with VS 2008 Beta 2 VPC, note that the VPC unlike earlier thought, will expire on 1st Nov 2007 itself. In case you have been using TFS along with the VPC, follow the steps mentioned at Moving Team Foundation Server to take a backup of your DB and prepare to move to the new VPC.

Since the timeout is at OS level, it is still being researched if anyone will be able to access their data on the VPC after 1st Nov 2007 or not. Additional guidance will be made available shortly. Keep a watch here for latest information. 

 

October 22, 2007

BizTalk Assembly - Under the hood

For some work I was doing with BizTalk 2006, I had used reflection and played around with internals of BizTalk Assembly. With BizTalk 2006 R2 now available, I decided to give the code I was working then, a try again.

I have earlier blogged about installing BizTalk 2006 R2 on my Vista machine and as part of that I had built the CallOrchestartion SDK Sample. I decided to work with this sample code itself.

Continue reading "BizTalk Assembly - Under the hood" »

October 08, 2007

Aspiring Software Architect Program

If you aspire to become an Architect, you may be interested in the current webcast series being conducted by Vikram Rajkondawar, Architect Advisor, Microsoft. In all, there are 9 webcasts, of which 6 are still remaining. You can register for these here. Note you will have to individually register for all the sessions you wish to attend.

The sessions are really interesting and unique since these are presented as a dialogue between Vikram and practicing Architects from across the Indian Industry and they share their wealth of experience via these sessions. As you attend you even get a chance to practice the concepts discussed, by participating in the Case Study contest.

October 04, 2007

BizTalk Server 2006 R2 on Vista

BizTalk Server 2006 R2 is now available. Introduction paper to this version is available here. Get a trial version of it from here. MSDN Subscribers can download it from the MSDN Subscribers download site. The latest documentation for this version is available here.

I had earlier blogged about getting BizTalk Server 2006 to work in Vista. At that time BizTalk wasn't officially supported on Vista, but I had wanted to test if it worked or not. The current R2 release is now officially supported on Vista. So I decided to give it a try again. I used BizTalk Server 2006 R2 Developer Edition and worked on Windows Vista Ultimate.

Continue reading "BizTalk Server 2006 R2 on Vista" »

September 13, 2007

Webinar: Leap Ahead with Windows Vista

Lead ahead with Windows Vista, September 19, 2007. Read More