Infosys Microsoft Alliance and Solutions blog

« July 2008 | Main | September 2008 »

August 28, 2008

IE 8 Beta 2

I just finished downloading IE 8 Beta 2 and installed it. I hadn't tried the Beta 1 as yet so was pretty excited to check this out. During installation it showed that some windows update patches were also being installed. Post that I encountered the famous restart now to let the changes to take effect dialog. I did restart.

It did some configuration before restarting and some immediately after restarting and I logged on to go ahead and start working. Alas! Things aren't always easy. My email (outlook) won't connect to exchange server, my communicator didn't connect to communication server and IE refused to open any sites (intranet or internet) and showed a message to "Diagnose connection problems".

I was really taken aback! The network card took quite a bit of time to get the IP address, but even after that, nothing worked. Running the diagnose didnt help. I refused to believe that installation could have done something, so I logged onto my other desktop (which is still running IE 7). Everything was working fine there so there wasn't any sudden loss of network connectivity. My email, communicator and internet access all was working fine on this other machine.

Strange! I hate it when things happen which I can't explain and this was very much one such scenario. So I tried another time tested remedy. Reboot!! and voila, all was back to normal and the sun started to shine again.

This one additional reboot later, I am now happily working with IE 8 and even able to write this blog and publish it. Good luck with your experiments with IE 8 Beta 2.

August 22, 2008

Reflector needs registration

There will be probably very few out there who haven't heard about Reflector and don't use it. Earlier today I noticed this blog that mentioned Red gate acquiring Reflector. I proceed to the mentioned site. I noticed that the latest version if 5.1.3 and I had 5.1.1. so I clicked the "Download your free copy now!" button.

Interestingly the tool may still be free, but laying your hands on it isn't that easy anymore. You are now required to register to download. This is a bit of a damper. I will eventually register and download the latest, but having to register to get the freely available tool earlier !! I don't like it.

August 21, 2008

WPF- AppDomain - Cannot find type

Sometime back I had blogged about AppDomains in WPF and also later updated this with another blog which mentioned the usage of Dispatcher to shutdown the AppDomain.

Recently in a project where we had to use AppDomain to launch a WPF application, we ran into issues when we had the application refer to external assembly for say some of the controls it was using. Confused? Let's take an example. I have a WPF application DummyApp.exe and a WPF User Control assembly WpfControlLibrary.dll. Now DummyApp uses user controls from this WpfControlLibrary.dll in some of its XAMLs. Finally, I launch this DummyApp.exe from my another WPF application (call it Tester.exe) in a new AppDomain.

When I do this, i get a System.Windows.Markup.XamlParseException with message as - "Cannot find type 'WpfControlLibrary.UserControl1'. The assembly used when compiling might be different than that used when loading and the type is missing.  Error at object 'grid1' in markup file 'DummyApp;component/window1.xaml' Line 8 Position 10.", where grid1 is the Grid control in a  XAML in the DummyApp's window1.xaml file. The WpfControlLibrary.dll is however present in the same folder as is DummyApp.exe.

Searching online we found this on the WPF Forums (and also here). This is a pretty old issue but also has some recent updates. Looks like the issue still exists. The solutions that are mentioned there

1. Ensure assembly version isn't using the 1.0.* syntax, wasn't valid for me, since the assembly version was already set to

2. Add a reference to the WpfControlLibrary.dll in Tester.exe, didn't make sense since we would be using this Tester.exe to launch any external WPF application. We can't go about adding references to all such assemblies. 

3. Another option was to just copy the WpfControlLibrary.dll to the path where the Tester.exe was running from. This was something I could do, but then isn't an elegant solution.

However points 2 and 3 clearly point to the fact that the issue is related to not being able to load the WpfControlLibrary.dll and hence the failure to load the UserControl1. The failure to load the assembly will happen if the assembly is not found in the path that is being used for assembly probing and hence copying it locally to the Tester.exe's path confirms that, that really is the case. So the summary is that the new AppDomain that is created is using the same path as that is for Tester.exe and hence the loading of other assemblies fail, even though they are present in the same path as DummyApp.exe.

Checking the documentation on AppDomain.CreateDomain, we realized that there is a flavor of contructor that takes in the a parameter to set the appbasepath, which is essentially the path that the assembly resolved uses to probe for assemblies. This path can also be setup by using the AppDomainSetup class and passed as a parameter when creating the appdomain. So that's what we finally did as below and the DummyApp.exe loaded without any more issues.

            AppDomainSetup setup = new AppDomainSetup();

            setup.ApplicationBase = @"D:\VS2008\WPF\DummyApp\bin\Debug";

            ad = AppDomain.CreateDomain("test", null, setup);


We also found this where is clearly says that ApplicationBase is the most important property one should set before working with AppDomains. No wonder, reading documentation upfront helps minimize errors later !

August 19, 2008

DeepZoom - unable to export

I had downloaded the latest Deep Zoom composer and was working with it to create a project with many images. Once done with the scenario, when I went to the export tab, I found that the export button was disabled. I could not figure out a way to enable it. Even providing the output path didn't help and I could not get any specific answers online.

Later I realized that this was happening since I had exceeded 4 billion pixels and hence the export wasn't working. This message was put in the bottom right corner of the application in the composer tab (see image below) and hence i had missed seeing it earlier. The "Learn More" link however doesn't help as well and only points to the Expression Blog. Reducing the # images, I was later able to export successfully.


August 14, 2008

My .NET Application Runs

Why would I build an application that doesn't run? Somewhere I recently read about catchy titles and that it helps attract people to read it. So I thought of this title. Hopefully it is catchy enough :-).

Well, if you have been working on .net, you know possibly that .net applications when run from network path, are categorized as LocalIntranet and thus have reduced security priviledges and this causes exceptions when running the application. This has been addressed with .net 3.5 SP1 and now you can run your applications of the network path without issues. Read more about this here and here.

August 12, 2008

Installing Visual Studio 2008 SP1 RTM

Earlier today I downloaded VS 2008 SP1 and also .NET framework 3.5 SP1. The framework SP1 installed without issues, but the VS 2008 SP1 failed. When I looked into the log file, it said something about KB945140 failed to install. I searched online and was surprised to find this pointing to VS 2008 SP1 Beta. This didn't made sense. Why would RTM version point to Beta version?

On looking again at the VS SP download link, I realized that the RTM is still with the same KB number. Now this did made sense. I guess when it didn't install earlier, I was just a bit taken aback and hence got confused with the KB#.

However there was something that caused the installation to fail. Somehow the log file though pretty descriptive, didn't give much clue. I have working on Silverlight 2.0 Beta 2 as well, so then thought that this might cause some issues. But the release notes say that the SP1 will work even with Beta 2 installed, though one will have to install the Beta2 bits again. Now that's a bit funny. If it does work with these bits already installed then why install them again? The installation preparation tool also didn't complain this to be an issue (see more details here), but, I didn't want to take any chances so I removed it.

I also decided to give Windows update a shot to ensure that all earlier patches have been installed. Since I run Vista Enterprise Edition, the updates are managed by System Admin and running Windows update either showed no updates to be installed or some error. It also had another link that said "Check online for updates from Windows update". I selected it and it started by updating Windows update software itself and then suddently showed a list of 22 patches that i had to install of which 20 were recommended. My spider sense tingled and I decided to install the recommended updates.

With all updates installed and a system restart later, I was back to installing SP1 and this time it seemed to do something. It started to show "Installing VS90sp1-KB945140-ENU.exe" and the progress bar almost didn't move. I kept my fingers crossed and around 40 min later, the service pack installed successfully. In the initial 15 min or so, the progress bar almost doesn't move, thus giving a feeling that the installer is stuck up, but a little patience and it all worked out. BTW, during setup, it did ask me for the original installer from where I had installed VS 2008, so don't forget to keep that handy.

So if you want to install this service pack, you may want to do this during your tea/coffee/lunch break.  

WPF DataGrid CTP

Visual Studio 2008 SP1 and .net framework 3.5 SP1 released versions are now available. See here the summary of fixes in this service pack. What is also now available is the WPF DataGrid CTP Release. See here for details on its features. It is available on WPF Codeplex site for download along with some information on WPF Futures.

A sample that Vincent has put together for DataGrid can be seen here. I am going ahead and downloading the DataGrid control. If you are also working with this version, do share your feedback on this control.  

August 9, 2008

SQL 2008 RTM depends on VS 2008 SP1

If you have been following updates from Microsoft, you would already be aware that SQL 2008 RTM is finally available. I also downloaded this version from MSDN subscriber downloads and asked my team (who has been actively following up on all earlier CTP releases) to use this version and get going.

We were surprised to find that we could not install SQL 2008 on our dev boxes since RTM depends on Visual Studio 2008 SP1, which hasn't been released as yet (expected next week). We could very well install this on a box without Visual Studio, so this, fortunately, wasn't a major roadblock. Read more about this dependancy here.

August 6, 2008

Offline Web Applications

Consider a  travelling salesman who uses online applications to access his emails, keep a tab of his appointments and to store his contact information. Since he will be  travelling most of the time, he may not access to internet connection all the time. When he is offline, he can no longer access his favorite online applications.

The HTML5 specification tries to address this by providing  two solutions: local data storage and an offline application HTTP cache which makes sure application is available when user is not connected. Currently Firefox 3 is planning to support these capabilities. It will be interesting to see how the other browsers support this specification.

Google Gears,a browser plugin from Google also provides a solution for this. It consists of a local database which is based on SQLite to cache the data locally.Using Gears, a web application may cache the data when application is offline. Then it can synchronise the data in cache when it is back online. It also consists of a local server, to cache and serve application resources  without needing to contact a server.

 Silverlight does not provide the above features as of now. It is planning to take Silverlight offline eventually and is considering it in feature list for next version of Silverlight.

 In this series I will discuss and share my thoughts about how we can create Offline Web applications today using Silverlight.

 In next article i will talk about how to add offline database storage abilities in Silverlight.

Vista - Setting color for desktop icon text

Earlier today I modified the desktop background picture on my Vista machine and realized that the light tone of the image, caused the text of desktop icons to become unreadable due to their default white color. This I thought was easily fixed by modifying the font color, but i was surprised to not find any option to do that within my Aero theme. This was something I could easily do in XP.

Some of the online solutions seemed to point to revert to classic theme and that this text color change wasn't possible in Aero. This was very disappointing. Then I found this. The suggestion here worked. I initially set the desktop background to solid White color. This caused the text color of desktop icons to become black and I then set the picture i had set earlier. Not a very elegant way, but this did get me to the state I wanted to be in.

August 4, 2008

Virtual Earth ASP.NET control

Check our the new set of Windows Live Tools available that work with Visual Studio 2008. These also include the ASP.NET Virtual Earth Control and you can find detailed video introductions here.

Since I now work more closely with Silverlight, I look forward to the easier integration of Virtual earth with Silverlight and easy usage.

Subscribe to this blog's feed

Follow us on

Blogger Profiles

Infosys on Twitter