Mobile Apps for Dynamics AX
Business is getting challenging as well as exciting. MS Dynamics products are adding mobile apps into its arsenal which I believe is not only a competitive necessity but will also add to the fun of doing work.
Business is getting challenging as well as exciting. MS Dynamics products are adding mobile apps into its arsenal which I believe is not only a competitive necessity but will also add to the fun of doing work.
Continue reading "Integrated Vehicle Management App (Part 2)" »
Continue reading "Integrated Vehicle Management App (Part 1)" »
Continue reading "Windows 8.1 Preview Bits - First Impressions" »
Since the time Microsoft announced Windows 8 and showed glimpses of it few years back, it has been highly talked about. I have had my fair share of blogs and papers on it.
Now with roughly half a year since Surface RT hit the retail stores and Surface Pro more recently making its presence on the shelves, the discussions around Windows 8 are anything but slowing down and most of the messages that I am hearing are around disappointment of people with it.
A colleague just shared this. When Microsoft had released Phone 8 they had talked about 18 months cycle before a new version will be made available. Phone 8 support ending in July 2014 is what it probably meant. Unlike regular desktop OS, in phone space, I believe once they release a new OS, they aren't really bothered about the earlier one. They probably took a different stand for their first version and did bring out Phone 7.8 (but with very limited new features).
Looks like this smart phone space will have very different dynamics. What do you think?
As I was just reading that Surface RT machines are hit by update issues, I ended up recalling that Windows Phone 7 had some early update issues. The devices had also run into issues in being able to download and update the firmware.
Is there a lesson to be learnt here? Is MS who has tranditionally dealt with PCs and workstations which typically involved over the LAN or CD based updates, not being able to manage over the wire updates? But surprisingly the Windows update service has been running well for many years now.
Let's hope that Phone 8 isn't hit by similar issues.
Panasonic showcased prototype 4K resolution 20" Tablet at CES 2013. Read about it here, here, here and here. At 20" is that really a tablet? In this era when existing tablet makers are trying to go for smaller screen, does this 20" TV Monitor like screen make sense?
Given the size, it surely isn't portable as well. Also such high resolution will not be of much use as of today as application will appear too tiny on it and impossible to read and operate.
What do you make of it? Would a device like this succeed? Does it even qualify to be called as a tablet? What really is a tablet?
I was reading an article about What Windows 8 Tablets mean for CIOs, and mostly agree to the points there. Security, ability to access existing applications, and BYOD will probably be key decision factors. I however don't agree that CIOs need to be concerned about number of apps in the market place.
CIOs will need to worry about access to the enterprise applications and not really how many apps exist on the market place. That is a factor employees will need to consider when deciding which tablet to buy for themselves. Their choices will mean that CIO will need to worry about supporting disparate devices in the enterprise. What do you say?
Forrester suggests that Windows 8 has had limited sale and organizations aren't yet inclined to move to Windows 8. The expected push seemingly will come from consumers via BYOD options. [Update] Microsoft reports a sale of 40 million licenses since its retail launch last month.
What is your take? Do you think it would have been good had Microsoft kept the modern UI restricted to Windows Surface (tablet) and the current desktop UI as is for desktops and laptops?
With 17+ years of experience on Microsoft Technologies, with my current work focus on Kinect, PixelSense, Windows 8 and Phone 8, with having access to Kinect and Windows 8, but using an Android smart phone instead of Windows Phone isn't something that is appreciated. With Phone 8 now in market, I have been thinking of replacing my phone and my wife was happy enough to take my earlier android phone for herself.
However I could also just not go and buy a new Phone 8 device, so thought of first playing around with one for few days to figure out how it felt. Since we got a new Phone 8 device in our Lab, I had the earlier HTC Phone 7.5 device available for experimentation. Here are some of the things I felt about using the Phone 7.5 device over few weeks.
Windows 8 launch is later this week and we keep reading about mixed emotions from people who have tried it out. The latest I read is this blog which includes an interesting video as well. Microsoft surely has touched lot of nerves with their blod steps with the Modern UI.
Two weeks and two days for the retail launch of Windows 8 and the Surface tablet. The Windows Store is already open and about 3000 apps have been published. Microsoft is doing all it can to get the store to fill up quickly, but the plan for having 100K apps in next 90 days seems a bit too much to me.
With the existing about 3000 apps, we are talking of about 97000 apps in next 90 days. Simple maths shows that this means about 1078 apps a day, i.e. about 45 apps an hour, or just about 1 app published every min in the Store. Needless to say the application has to be implementation complete, test complete and Windows Store certification complete to reach the published status.
To me, this is extremely difficult if not impossible to achieve. What do you think? Will there be 100K apps in Windows Store in next 90 days?
I have had a chance to work on Windows from its Windows 3.11 for workgroups, back in 1995, all the way to the current Windows 7 and the upcoming Windows 8 as well. In my experience no previous Windows version was this eagerly awaited and extensively discussed as is happening for Windows 8.
There have been hitches in between like the Windows Millennium edition and Windows Vista, and the versions succeeding them did get good attention, but those are still easily eclipsed in front of news Windows 8 is making. Industry and media is abuzz with speculation on success or failure of Windows 8 and is the RTM version really ready for worldwide launch or not.
While people do texting, emails, watching movies, reading and some business apps, games also play an important role in what people do with their tablets and smart phones. Having a rich app store is a key driving factor in this space.
No wonder then that MS is making all attempts to have a good set of applications in the Windows 8 Store by the time the Windows 8 Tablet launches on 26th Oct 2012. Here's a list of initial games that will be available on Windows 8 and it includes some of my favorite ones - Angry Birds, Cut the Rope, Fruit Ninja, Minesweeper etc.
We have known for a while now that the retail availability of Windows 8 will be on 26th Oct. So it should not be a surprise to have a big launch event on 25 Oct by MS to make the formal annoucement.
MS had also showcased Phone 8 in Phone summit, but what was not known so far was the launch date for the same. Some of the dates are now being made known. Read here. Even if Phone 8 doesn't launch on 29 Oct, given that the BUILD 2012 Conference starts the next day, we can expect Phone 8 to definitely get showcased there.
There is a lot in the name as it is identity of something. It is the way we know and talk about that something. With Windows 8 Microsoft seems to be on a name breaking spree. Earlier they rebranded Surface as the new Windows 8 Tablet and renaming the earlier MS Surface as PixelSense. Now it is the Metro UI being renamed as Windows 8 UI.
We are used to code names for products and then switching to their final names so this will also settle down. But while in transit, conversations are becoming longer as I have to talk something like this - "We can do so and so on PixelSense, earlier known as MS Surface" OR "MS introduced the new user experience paradigm called Windows 8 UI, earlier known as Metro UI"
Microsoft had showcased Windows Phone 8 some weeks back at the Windows Phone Summit. You can find the videos from that summit here. If you are an enterprise customer and evaluating moving on to Phone 8, you may find my viewpoint paper published here helpful.
Do share back any comments you may have on the paper. I would be glad to discuss further.
Microsoft has annouced about general availability of Windows 8 on 26 Oct 2012. I have been playing around with dev preview, then consumer preview and now release preview and look forward to the final release. I do intend to update my home PC with Windows 8.
While there is no specific annoucement on Phone 8 or the update for existing consumers to Phone 7.8, I would guess that Phone 8 should release around the same time as Windows 8. The upgrade from 7.5 to 7.8 will probably happen after that, in an attempt to push some of the existing consumers to Phone 8.
[Edited 20 July] Updates on dates of Phone 8, Office 2013 etc
Consumer preview for Office 365 or Office 13 as it is called for Enterprise users is available now. Initial view is that looks great and definitely has used Metro styling. The application launch splash screen to the main user interface is all very metro like.
Microsoft unveiled the Windows 8 Surface Tablet yesterday. One interesting feature along with it being on Windows 8 is the built in paper thin keyboard on the cover. However since it is so thin, it seems to have the same problem like the screen/virtual keyboards and i.e. of no tactile feedback. Probably they should look to integerate with this.
Some weeks back we had read about side loading of enterprise applications and that the app store was mainly for uploading and sharing metro apps. There is an update to that now whereby we can list desktop apps on app store as well. Do note there is only listing support. Desktop apps will not be deployed via app store.
An Individual user can probably use this and then get to the desktop app's main website to download and install it. An enterprise user will mostly still rely on side loading as it is unlikely that enterprises will allow direct access to app store to install either Metro apps or search desktop apps.
In my previous blog I had talked about Metro Applications and Metro UI. Visual Studio 11 would qualify as an application with Metro like UI as we have already seen in the current beta release. It also no surprise that products from MS will imbibe the Metro style guide. We see similar trends with upcoming Office 15 (you can search online for images).
VS 11 however got some pretty strong comments from developer community and MS is making changes to its UI. The Metro look is here to stay, so it is still very much there, but the application has also been made a bit more colorful. Check out the details here.
Continue reading "Desktops / Laptops / Tablets / Smartphones" »
Microsoft Surface is getting a big facelift with the commercial launch of the 2.0 version developed in collaboration with Samsung. Here is a quick listing of what's new. We at Infosys having worked with customers in the past on the earlier Surface platform are all excited about this. Especially the thinner design that supports vertically mounting and the lower cost of this new version expands the scope of potential business applications. One particular domain that is showing much promise is retail banking.
Microsoft Surface can help generate customer interest in financial products, increase sales and reduce processing cycle time. We are exploring Surface being used at retail banking branches both as a self-service kiosk as well as a discussion tool for customers with banking sales representatives. The bank can issue credit or debit cards featuring identity tags using which customers can identify themselves by placing these on the Surface table. Alternatively identification can be achieved by placing their cell-phones, which might need a preinstalled application that communicates with Surface via Bluetooth. Similarly banking sales representatives can have identity cards with these tags to identify themselves and manage information using Surface.
Continue reading "The future of retail banking with Microsoft Surface" »
While the official name seems to be Windows Store, it is a no brainer that the initial set of applications will be targeted to Windows 8 only and will be Metro apps. Though very similar in concept with the existing Phone 7 Store, it is a different store as the apps built for one aren't automatically available on another due to different programming platforms as of now. With Apollo some of this stands to change.
Details of the new store have started to make appearance on the new Windows Store blog. Prior to the store's launch, MS is attracting people to build initial set of applications that can be deployed on the store. The first round of contests is already over and list of winners is awaited.
It is hardly two years since Microsoft had showcased Windows Phone 7. The SDK came out in September 2010. In Asia the availability of Phone 7 has just completed an year and we have already had a version upgrade to Mango (7.5).
On desktop/tablet side, Windows 8 developer preview was first made widely available in Build Conference in September 2011. The beta is expected anytime soon and then later this year the final release of this product.
Continue reading "Phone 7, Mango, Windows 8, Windows 8 on ARM, Apollo (Phone 8)... phew! " »
Microsoft annouced the other day availability of Kinect for Windows SDK. This version can be used to build commercial application, something which wasn't possible with the earlier SDK. Alongside a new hardware device is also available now (priced higher than the earlier one).
While this SDK will work earlier device as well you would not be able to leverage the new near mode support which allows you to detect objects mearly 40 cms from the device unless you use the new device as well. Additionally if you are migrating your earlier code to the new SDK, you may want to use the Microsoft.Kinect.Migration assembly to aid the migration effort.
We have been working on Windows 8 for few months now and understanding the new programming paradigm for Metro apps along with understanding of HTML5, WinJS, WinRT, XAML Apps etc.
We will be sharing our learning here. Keep checking back for updates. For starters, my colleague, Mani, has written her first blog here.
In Immersive Technologies Track we are working on some exciting technologies related to data visualization, touch, gesture and augmented reality. The main products on our radar are Phone 7, Surface and Kinect. We recently published a technology roundtable newletter sharing some insights of our work. You can get to the newsletter from here.
Comments are welcome.
I had talked about Silverlight 5 earlier here and here. Though Silverlight is still used to build RIA apps for the web and is the platform of choice for Phone 7/7.5 development, Microsoft has not been very forthcoming on its future.
According to Mary-Jo Microsoft is about to release Silverlight 5. This is good, but it is also clear that Silverlight no longer retains the status of platform for cross device compatibility. That has been taken over by HTML 5.
Microsoft Kinect has been a revolutionary product. Just about an year has passed and apart from the original usage of controller free gaming environment, Kinect has come a very long way and people are trying all sort of experiments with it. Read an interesting summary on 365 days of Kinect here.
We are doing our share of experiments with Kinect. Hope to be able to write about them soon here.
Just last week I had talked about the Mango update was expected in a week or so and am glad to have it deployed on our device. As expected this update is versioned as 7.5. The update experience was pretty seamless.
The issue is that all of the applications that we had deployed earlier (built on version 7.0) are marked as revoked and need to uninstall them. The developer account also got locked and need to unlock this. And the market place is also finally accessible in India as well.
After seemingly never ending wait, the time finally has almost come. A colleague pointed out to this update on Phone 7 blog, which says that we should hope to see the update being rolled out to existing devices in a week or two. Am eagerly waiting for it, to deploy the Mango SDK based applications on the updated device and finally see them work (there is only so much we can get on emulator)
Admist the noise around things like Windows Azure, Windows Phone 7 Mango release, HTML 5 and also Windows 8 and the upcoming BUILD Conference, Silverlight 5 was lost somewhere. Just earlier today at breakfast I was talking to a colleague about what happened to Silverlight 5 and that there is hardly any updates available on it.
And here we are... Silverlight 5 RC recently released. You can get access to the bits from here.
Microsoft provides Business Productivity framework and tools related to it for enterprises. Let's see in this blog what does it provides and what offering are available from Microsoft in this field.
Continue reading "Collaboration and Microsoft's Business Productivity Offerings" »
Microsoft Surface is a few years old, but I didn't seem to have done very well. There are limited instances of its usage and applications that run on it. Some reasons for this have been a bulky horizontal table, the cost and specialized hardware, which meant high replacement costs in case some parts were to get damaged. The base operating system was also Windows Vista, which we know wasn't all the successful
Post PDC there were many questions on future of Silverlight and Microsoft itself had caused these speculations. I had shared my views on it here. Well, yesterday Microsoft laid these to rest by announcing Silverlight 5 in the Firestarter event. The event was telecast live across the world using live streaming. If you didn't watch it live, you should be able to get to the keynote here.
If you check online forums, one of the issues that has caused possibly most grievances is the styling of the WPF button control. You set some property values for things like foreground color and background color and when you run the application things don't always work out. Either the button will show some default animation when having focus or will not use the specified background when is in disabled state.
Recently a colleague was styling a Button control and had a need for custom disabled look and we landed in the same problem. We had set a background color, but when disabled the button will default to the light gray color. Trying various options didn't work out. Interestingly the properties like Foreground or Opacity worked fine. The designer in us said that we can always create a custom style, but the developer in us wanted to know why this doesn't work.
Northwestern Mutual has won the 2010 Innovation award from Windows Financial Services Magzine. Infosys is a Strategic Service provider for Northwestern Mutual. Infosys helped Northwestern Mutual in developing the new Website on Sharepoint.
Please check out the details at:
http://www.windowsfs.com/uncategorized/northwestern-mutual-wins-2010-innovator-award
Continue reading "Web Site Innovation : Northwestern Mutual Wins 2010 Innovator Award" »
Many a times you might get this question, where do I draw a line and say what's virtualization and what's private cloud? While setting up a private cloud lab we had similar question. Though, there is no clear answer, we tried to take out a few characteristics which might help.
Continue reading "Virtualization and Private Cloud - Draw a line" »
Continue reading "Working with Images in Silverlight Application" »
Both VS 2010 RC and Office 2010 RC are now available. If you have access to MSDN Subscriber download site, you can get VS 2010 RC from it. For general public these bits will be available today (Feb 10). Like Beta 2 bits, these bits also come with "go live" license. If you had earlier bits, you will need to uninstall those before installing RC. I was trying to figure out if RC to RTM will be an upgrade path, but haven't found specific information on this as yet. If you know, do write back.
However Office 2010 RC isn't available via MSDN download as yet, but is available on connect site for specific users. If haven't got a specific invite to access Office 2010 RC, then both on connect site or msdn download site you will still find Office 2010 Beta bits.
In my earlier blogs (here and here), I have talked about Win 7 and the new touch experience it brings.
When talking about touch, there are essentially two aspects - touch and gestures and during a recent internal discussion, I felt that these aren't that well understood by people. What's really the difference between the two and what it means to be supporting either of these?
Continue reading "Win 7 - Difference between Touch and Gesture" »
Yesterday MS announced a delay in the release of the upcoming Visual Studio (VS) 2010 (called Dev 10 in short). In both Somasegar's and Scott's blogs, the reason mentioned is addressing the memory and performance issues. While this definitely means that the end product would be better in these terms, what does this delay mean to you?
The good part is that the release candidate planned for Feb 2010 will have the "go live" license support, so any plans for production deployment may still be carried on. What is of more interest to me is how this impacts the Silverlight 4 release plans, since SL 4 as of now needs Dev 10?
In my earlier blog I had touched upon some high level concepts on touch support for applications, that is now available with Windows 7. In this I will spend some time on multi-touch and few other points around support as part of .NET and on Surface.
So when we say multi-touch, what does it really mean? This is also where the basic touch to mouse promotion and real multi-touch differ. Multi-touch means the ability to detect multiple touch points at the same time on the touch hardware and be able to program against each of them independently. In a mouse driven world, there is single point of click and hence controls really respond one at a time. With multi-touch however we now are capable of programming against multiple controls at the same time. While most multi-touch samples/demos show usage of multiple fingers, what you should realize is that it is now capable of supporting multiple people interaction. A behavior, which MS Surface, demonstrated very well.
Yes, this title is influenced by death by chocolate, where in you get an overdose of chocolate. At this time I feel exactly the same for Silverlight (SL). With just over 2 years since the first version made its mark felt, Silverlight has come a long long way. Ironically, as part of TechDays event hosted specifically at our campus, we talked a lot about SL3 and right then, across the ocean, at PDC 2009, Microsoft just unveiled SL4 beta bits.
When we started looking at SL 1.0 back in late 2007, it had limited feature set with XAML support, and most work had to be done in java script. It looked more of media (video) playback at that time. MS called it their RIA platform, but it didn't offer much at that time. With SL2 at PDC 2008 and SL3 just earlier this year in July 2009, a host of features have found their way in the platform. Along with multitude of controls, to .net language support, to IIS Smooth streaming, to perspective 3D, to out of browser experience, SL is a technology you just cannot ignore.
Continue reading "Part 4: Which Presentation Tool to Use?" »
I have been busy with various other non-technical work for few months and hence didn't get a chance to experiment anything new Off late. I finally managed to find time and check out Sketchflow. Sketchflow is a new tool available along with Expression 3 Suite which allows quick and easy prototyping. It allows one to create prototypes that are very near real appliation like, but still retain their prototype look and feel (by using wiggly styled controls) and allow for easy feedback back and forth between you and your customers.
If you have't seen this as yet, you can get a very good idea on it by checking out the following
1. Keynote video from MIX 09, where Jon Harris showed a very interesting Sketchflow prototype. You can skip to about 1 hr 39 min into the video to directly jump to this part
2. From Concept to Production video, another session from MIX 09, by Christian Schormann, where he walks through a snowboard sketchflow prototype. This and the keynote video code comes as part of samples with Blend 3.
3. A very good step by step walkthrough of Sketchflow is available at the dynamic prototyping site.
I am enjoying working with Sketchflow.
My team members are working on a Silverlight based application to be deployed on Cloud. Things were going smoothly when one of us tried accessing this application via IE 8 and we were surprised to see the application not filling 100% height but taking about 25% space only. We tried various options for setting the height to 100% like setting it for body element, as well for the form element etc, but with not much luck.
Finally, found a workaround on the forum here. Setting the meta tag in the head to enable IE 7 compatibility (<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />) worked. This is surely not the preferred solution, but it got us going. Do share if there are any other options that may have worked for you.
If you are following my blabberings on Win 7, you will notice that most of things have worked fine for me so far, except for Office Communicator 2005 that I wrote about here. Another thing that I found not working correctly is the network adapter's ability to detect and connect back to network post hibernation. I found many instances of similar issues logged on the forums.
I even tried ensuring that the adapters are set to not power off, but that didn't help. The issue is specifically visible when I switch network post hibernation, i.e. say I was using LAN before getting into hibernation and post resume tried to join a wireless network. I am using a Dell XPS M1330 laptop and have even asked my Dell vendor to check for any updated drivers, but none so far.
Are you also facing this issue? What worked for you? In my case, reboot is the only option as of now.
Having worked on MS platform all these years, I am well aware that while we get on to understanding and using any new releases, MS is usually well underway planning and development of next version. With self having just got onto Win 7, it wasn't a big surprise to see information on Windows 8 already being available. Check here and here.
Another aspect of Win 7 that I noticed while using it for this past couple of week is the shutdown time. I haven't measured it explicitly but based on causual observation it does shuts down much faster than Vista. Boot time somehow doesn't seem to have changed much.
I did find this comparison on forums though and these are pretty much in line with my experience. How about your experience?
I have talked about few of my experiences with Win 7 so far here, here and here. In general the experience so far has been good and applications either work as is or by setting the compatibility mode appropriately.
However with Office Communicator 2005 there is an issue in desktop andapplication sharing. OC 2005 uses Netmeeting as the underlying mechanism for sharing and Netmeeting isn't supported Vista onwards. The OC 2005 planning and deployment guide also only lists OSs till XP as supported and Vista and Win 7 aren't. There was a hotfix released later by MS to support Netmeeting on Vista, but this isn't supported on Win 7.
So with Win 7 you can use OC 2005 for chatting, but can't do desktop and application sharing. You need to either upgrade to OCS 2007 and OC 2007 or use other tools like Live Meeting etc.
Some days back I had written about my Win 7 RTM migration and about my experiences with the issues Naveen had faced. In this blog, I will capture some of the things that I noticed and most of them are those that I liked.
You will surely find lot of details about new features on Win 7. Via this entry I am only capturing the things that I noticed and have started to like.
Windows 7 RTM is available on MSDN subcriber downloads is not a new news anymore. I also had downloaded the Enterpride edition few days back and just got around to installing it. The experience so far is good.
Some months back my colleague Naveen had installed Windows 7 RC and had faced some issues that he had written about here. I will talk about some of the issues he faced and how they behave on Windows 7 RTM.
The other day over a cup of tea with a few colleagues we were discussing presentation skills. I got good comments about fluency in presentations, time management and overall how I was able to do a good job at it.
I have decided to take a deviation from the usual technical blogs that I have been writing these past years to write on presentation skills. There are many sites already out there that provide good material on this topic and I am not trying to be a presentation skills teacher here. Over the next few blogs, I will share things that I have found working for me.
Finally it is done with! A couple of weeks preparation, of which it was mostly done by Sudhanshu, we finished with the presentation as part of Virtual Tech Days. This was my first experience in such public forum and ironically there was no public, I mean none physically present, since it was all virtual.
We presented from the MS office in Mumbai and with some minor initial glitches on getting our laptops connect to the MS network, rest all went off very well. We did debate on the fact that since this is virtual, next time around we should be presenting this directly from our Infosys office and need not even come to MS office.
I and Sudhanshu had lot of fun while presenting the session and hope those of you who attended it also enjoyed it. Any further commets, feedback, questions are most welcome and Sudhanshu has already posted the slides and the code samples here.
I am sure you would be aware of recently launched Technology Preview of MS Office 2010. Depending on your access, you may be able to download it from Connect site. I have upgraded my Office 2007 to Office 2010 and so far the experience has been good.
I have spent most of the time in looking at Outlook 2010 as that is that I use more often these days at work and thought to share some quick points that I liked about it. This is by no means a feature evaluation and you can get that listing on MS site, but more of immediate reactions to some things I noticed.
Continue reading "Outlook 2010 Technology Preview - quick reactions" »
Earlier today a friend was trying to invoke GetAuditRules API on a file using c# code, but it was always returning a count of 0 inspite of having set a specific audit rule on the file via windows explorer. The surprising part was that GetAccessRules API was working and the code was running locally so it had full security rights as well.
The other day I finally got to install VS 2010 Beta 1. I had decided to build a VPC for the same so as to not impact my current workstation setup. Overall the experience was pretty smooth and the setup ended without any issues, but the initial few components did cause a bit of pain.
After every component (VC 9 Runtime, VC 10 Runtime, .NET 3.5 SP1 and .NET framework 4 Beta 1), i.e. 4 of these, I had to restart the machine and it was really painful. Beyond that it completed without any more restarts.
When we look at conditional validation needs in WPF, the typical option that people talk about is the usage of UpdateSourceTrigger property in binding expression. There are many examples that one can find on setting this to explicit and managing the validation or things like setting this to PropertyChange when validating textbox input without having to focus out of it.
However there can be scenarios where you can't use explicit since you want the normal two way binding behavior, but have a need to validate based on value of some other control. I had a similar scenario the other day where we had a combo box with yes/no options and the validation had to happen only if a value of "yes" was selected in the combo box.
Continue reading "WPF - Performing Conditional Validation" »
Microsoft introduced Windows Presentation Foundation (WPF) with .NET framework 3.0. What started as extensions to Visual Studio (VS) 2005 is a now a in-house native to VS 2008 and the VS 2010 designer is itself getting implemented in WPF (more details in Jason's blog here).
Needless to say that WPF is very powerful new presentation platform that really makes "imagination is the limit" a reality. Designers and developers can now work real closely like never before and create some really super cool user experiences.
Continue reading "WPF, XBAP, Silverlight - What do I use?" »
Earlier today I came across this very interesting blog on how you can use english words to specify dates without having to use the Date dropdown control.
I tried adding Indian holidays to the Calendar and then search for them, but it didn't work. Let me see if I can figure out a way to do this, but the concept of finding dates by names is great. If you know how to add personal named dates, do share?
The other day I was delivering a session on .net reflection and during the course of the session there were a few console based demo applications that I was showing to the audience. During one such demo, there was some change in code I did based on a query raised by one of the participants and to show how it worked, I put a breakpoint and happily started to debug.
Murphy, I guess had something against me that day and the debugging just won't work correctly.
Continue reading "Problem in Debugging .NET Reflection Code" »
Continue reading "Multiple AppDomains and Loader Optimizations" »
Continue reading "Impersonation and Delegation - There is too much confusion!" »
Continue reading "Calling Blueprint Command from .mht file" »
Mid last year, I had written about this issue where Word was crashing due to a default printer, which wasn't currently available since I wasn't connected to the office network. Windows 7 offers an interesting solution to this issue.
Did I say Windows? Should this not be really handled by Office 2007 service pack or maybe in Office 14? Maybe it will get fixed there also, but this feature in Windows 7 does offers a solution.
The other day we were ready to deploy an internal facing Silverlight 2.0 built application. As a final round of testing, I thought to put to use the EnableRedrawRegions settings that I had just learnt from Seema's talk in PDC 2008 as part of her session - Building an Optimized, Graphics-Intensive Application in Microsoft Silverlight.
Interestingly, after the application loaded, I could see a small portion in the middle of the page continuously changing colors. It could only mean that this region was getting redrawn again and again. But why? Checking the code we realized that we had some animation at load time and once the data was loaded, the animating panel was just pushed to back in Z order and another panel came on top. But this still meant that the animation was happening, but we could not see it. This EnableRedrawRegions flag really helped immediately identify and remove unwanted animation (we set the panel's visibility to collapsed).
In this blog we will see how to unfold multiple projects using Microsoft Blueprints. Unfolding default project or single project is quite easy. We will start with default and single project first and then see what extra needs to be done for multiple projects.
Continue reading "Unfolding Multiple Projects using Blueprints" »
Continue reading "Remote deployment of Clickonce application on IIS 7" »
If you have been following updates on Silverlight (SL) 2, you would already be aware of SL 2 Toolkit on codeplex. Scott in his blog has shared some amazing numbers on usage of SL and also given some indicators to where SL is headed in its next version.
I had been away from SL for some time due to other focus areas. However I decided to try my hands on the support for themes, a feature added with SL Toolkit.
Here's something that I accidently noticed today. Inside of a command prompt, of you type "cmd" (to launch a commonad prompt), it treats this as a new instance, though no new windows is opened. Now if you type "exit", the command window still stays since there were effectively two instances. Only when you type "exit" the second time, will the command window close.
This can go on at any level (I didn't really try too many levels). You can also easily make out the # instances by looking at the title bar. Every time you type "cmd" at a command prompt, you will see "- cmd" get added to the title. With every "exit" one of these goes away till you are back to the default title you had started up with and another "exit" will close the window.
Continue reading "WPF: Working with command line arguments" »
In a few of my earlier blogs, I have written about how one can work with Applications domains (or AppDomain) in a Windows Presentation Foundation (WPF) applications. You can find these
The information however is scattered across these blogs. I hence decided to consolidate the learning from all of these in a single place so that it is easy for the reader to follow through. You can still go ahead and read the above blogs, or read this one, where I will capture all that I have captured in the earlier blogs with more explanation where possible. Special thanks to Hua Wang from Microsoft for clearing doubts around these concepts.
Continue reading "Working with Application Domains in WPF" »
Some days back Microsoft had released the RC0 version of Silverlight. Considering that PDC 2008 is just about 2 weeks away, there was much speculation that that's when Silverlight 2 will RTM. But according to Mary-Jo, the release is very much expected later today. Keep an eye on Scott's blog for the announcement.
[Update: 14 Oct 4.20 am] The download should be available in the next few hours. Check the press release.
[Update: 14 Oct 9.00 am] Silverlight 2 is now available. To install the runtime, visit here. For related developer tools, visit here.
In part 1 we saw how using basic storyboarding/animation capabilities in Silverlight, we created a simple application where buttons move to new location when clicked and move back when another button is clicked. In this part we will see how using VSM, we can build the same capabilities with lesser animations and lesser code. The complete code (including code for part 1) can be downloaded from here - Download file. Note that I have built this using SL 2.0 RC0, but the concepts explained here will work with Beta 2 bits as well.
Continue reading "Part 2: Manage Page level states with VisualStateManager in Silverlight" »
Silverlight 2.0 Beta 2 introduced the concept of Visual State Manager (VSM). If you haven't checked it out still, here are some articles that will get you started.
VSM not only helps keep the looks and behavior of a control separate, it allows you to manage the various states the control can be in, along with the transitions, in a very clean and effective manner. Though most of the examples online today show this in context of a specific control and working with its control template, there is no reason why this can't be applied to the UserControl itself, i.e. at the Page level. You can very easily create custom states for your page and manage transitions between the states. In fact this can actually help reduce the total animations that you may have to write and also simplify the backend code.
Continue reading "Part 1: Manage Page level states with VisualStateManager in Silverlight" »
You would already be aware of the release of RC0 of Silverlight 2.0. If not check Scott's blog here. The details on the links for downloading these latest bits can be found in the same blog.
Note that unlike the previous Beta 2, this version doesn't comes with a go live license and if you visit the Silverlight installer page online, you will see that it still points to the earlier Beta 2 version (2.0.30523.8).
Displaying enums in ComboBox in WPF isn't really rocket science. The issue however comes when you want to display user friendly strings against the enum values. Enum unfortunately doesn't support this by a simple override to the ToString method.
The usual approach people take is the use the DescriptionAttribute. This attribute is assigned to each enum value and at runtime, using reflection, the value of the attribute is queried and is then displayed. The approach is definitely worth considering and I found an implementation of the same and a custom WPF ComboBox that will display such user friendly enum strings here.
Continue reading "WPF - Displaying enums in ComboBox control" »
When writing trivial get/set type properties, I have seen many developers still struggle during debugging since if they do a step into (typically F11), they end up going into the getter and setter methods as well.
Debugger related attributes have been available since early times, but somehow people seem unaware. Typically one can use DebuggerHidden or DebuggerStepThrough attributes, as shown in the following code snippet.
Back in June I had mentioned about Windows 7 and that there is lack of information and a changed stance from Microsoft. If you haven't noticed, there is now a blog (about a month now) by the Windows 7 team called Engineering Windows 7. The likes of Jon DeVaan and Steven Sinofsky, along with other team members blog here.
If you want to know what goes behind creating something like a Windows operating system, this will give you a good perpective.
Recently someone asked me about an issue he was facing in being able to add reference to an assembly in GAC from Visual Studio. This is a question that somehow keeps coming back. If you search online you will surely get pointers on how to solve this. The typical way is to provide the path to where your specific assemblies are by adding a registry key pointing to it, or add it to the already known standard paths and you will start to see your assembly in the .NET tab of the Add Reference dialog. See more details here. VS picks up files found in this path also - C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies.
Now if you are satisfied by this, you have really only addressed the symptoms, but not the root cause. What is still unanswered is why VS didn't allow you add assemblies from GAC in the first place and went about it in a roundabout way?
Continue reading "Unable to add reference to assemblies in GAC from VS" »
If you have been working with WPF applications you know that the current default behavior for adding the entry point (Main) method is via codegen. You don't write it yourself. The method is generated when you compile your application. A typical WPF project contains App.xaml which is marked as ApplicationDefinition in the csproj file.
Continue reading "How to write custom Main method for a WPF application?" »
Are you seeing something like this with IE 8 Beta 2? I have been getting this on and off and just realized when this occurs. If you are debugging a web based project (ASP.NET or Silverlight) from VS and then stop debugging from VS, the next time you open the browser, you will get this message. No harm done. You just select the "Go to your home page" option.
Interestingly, this doesn't occur if you are debugging, but instead of stopping debugging from VS, you directly close the browser window.
If you working with VS 2008 you must be already aware about how to target your application to run on different .NET frameworks. With .NET framework 3.5 SP1 now available, I wanted to target my application for this version, but surprisingly VS 2008 doesn't shows this in the list of target .NET frameworks. Harish describes how to get this done. Check it out here.
It would have been much simpler to just provide this option in the existing drop down itself !
The other day a team approached me stating that they had some issues in running and accessing a .net application on their newely configured Win2K3 64 bit dual core server. They were getting some sort of access denied when they moved their app from 32 bit to 64 bit. I told them that just by moving to 64 bit can't result in such issue and asked them to cross check and install .net 2.0 framework for 64 bit.
They had not installed it but soon reverted with another error while trying to do the installation - "Error creating process <C:\Docume~1\user\local settings\temp\1\IXP000.TMP\Install.exe>. Reason: C:\SYSROOT\system32\advpack.dll". I then refered them to this forum thread.
Continue reading "Interesting installation experience on 64 bit machine" »
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".
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.
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.
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.
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.
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?
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.
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.
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.
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.
In my earlier blog I mentioned about the custom DatePicker control. Towards the end where I mentioned about making the textbox read only, I also mentioned about not being able to edit this template in Expression Blend 2.5 June CTP. On the forums, someone clarified that since this control doesn't resides in System.Windows.dll, its template cannot be edited in current version of Blend.
One can however include the template as mentioned in MSDN and include that in the project and modify suitably. When I included that in a test project, I ended up with System.Stack.OverflowException. That can however be fixed easily as I mentioned here.
Continue reading "Silverlight - Preventing direct editing in DatePicker control" »
I love mysteries. So when a project team approached me the other day with an issue with their WPF application, I immediately jumped into it. The issue they were facing was really mysterious. Their WPF application was working and looking fine on all their Vista machines, but when shared with Client, it started to have problems. Text in some controls was clipping.
After trying on multiple machines locally, they found 1 Vista machine where the problem was reproduced. The mystery was that all these machines were using same resolution (1024x768), same dpi (96) and same theme, but text would clip on that 1 machine and work fine on all others. They were about to write this off claiming some issue with Vista.
Continue reading "WPF - Text clips on some Vista machines" »
When working with DatePicker controls in application, very typically they get used to manage start and end dates. Like recently I was writing a tracking application in Silverlight and had the need to manage allocation and deallocation and hence start and end dates. There are typical requirements also associated with such implementations like start date cannot be in past, end date cannot be before start date.
Implementing this with Silverlight DatePicker controls was fairly trivial. If you haven't used these controls, you can find an introduction to them here. These controls also offer other interesting properties that I played with namely DisplayStartDate. I then thought that some of things I did in the logic, would be useful in multiple scenarios, so why not create a new custom DatePicker control that will have these functionalities in-built.
Continue reading "Silverlight - Handling Start and End dates with Custom DatePicker Control" »
Want to develop a web application using Microsoft Technologies? The choice today will revolve around the mature ASP.NET, the upcoming ASP.NET AJAX or Silverlight (Beta 2 currently available). Needless to say that all have their benefits and specific features that make them attractive options to use.
Choice will also depend very much on if the application is internet or intranet facing, so let's talk about internet facing application. Both ASP.NET and ASP.NET AJAX are pretty much server side applications in that most of their logic resides on server side.
Continue reading "ASP.NET, ASP.NET AJAX and Silverlight - Which way would you go?" »
Panels, as we know, are pretty much the basis of building any Silverlight application. They help arrange the other Silverlight controls in specific manner like Stack allowing you to stack controls either horizontally or vertically, Grid allowing you to position controls in rows an columns and Canvas giving you a free flow behavior. This blog however isn't however a primer on panels and you can easily find information about them on the net. Check this for information on how to layout controls using these various panels.
At Mix 2008, in one of the sessions the AnimatingStackPanel was demonstrated. I found the code for the same here. I decided to go ahead and try this. However my requirement was for a wrap panel and not a stack panel. I found one here. This would serve my purpose but there wasn't any animation in it. In my earlier work with WPF, I had looked at Kevin's bag of tricks and liked the AnimatingTilePanel.
One of controls that I had been using when working with SL 2 Beta 1 was WatermarkedTextBox and when this was taken off from SL 2 Beta 2, I had to rework our application code. It is great to see the control now posted on Kathy's blog here. The discussion seem to incidate that we won't get the updated TextBox with Watermark property in Silverlight 2 RTM.
I downloaded this, but wasn't able to use it as is since the code continues to use System.Windows.Controls.Extended assembly name. I was using other controls like Calendar and DatePicker from the released System.Windows.Controls.Extended assembly with SL2 and this caused conflict when trying to add the assembly for using WatermarkedTextBox. This was however easily fixed by changing the project properties to create the assembly with the name WatermarkedTextBox.dll. I also had to change the namespace in the WatermarkedTextBox.xaml to the following to get the control working.
xmlns:local= "clr-namespace:System.Windows.Controls;assembly=WatermarkedTextBox"
Till the new property is available, this will do !
Recently for an application I was building on Silverlight 2.0 Beta 2, I had a need to use CheckBox inside the ListBox. Getting the CheckBox into the ListBox item was fairly trivial via the DataTemplate. However the problem started after that.
I could click on the first CheckBox, but when I tried to click on any in the remaining rows, the click won't work. I could easily see the hover effect over the CheckBox so wasn't sure why the click had issues.
Continue reading "Silverlight - CheckBox issue when in ListBox" »
The other day for a project work that we were doing in Silverlight 2.0 Beta 2, I was trying to get a tooltip to display for each item in the ListBox control. Things seemed to work fine if the content to be displayed in the tooltip was pretty much static or not dependant on individual items. I mean, I had a need that the tooltip should display different text per item, essentially data bind to some value for each item.
Does this makes sense? I guess it does to me, but you may be wondering about what exactly am I trying to achieve? Let me explain that with sample code. Below is the trivialized version of the code I was working on. There is a list of employees, who I am displaying in a ListBox.
Continue reading "Silverlight - Getting Tooltip to work for individual ListBox Items" »
Recently during my attempts to program with Silverlight landed me with a runtime exception (System.Windows.Markup.XamlParseException) with error as AG_E_PARSER_BAD_PROPERTY_VALUE. Fortunately, the error also provided line and column number in XAML. However when I looked at the XAML, it looked well formed and there wasn't any compilation error as well.
It was then that i realized that the compiler had actually missed catching the fact that I had defined click event handler for a Button in XAML, but not written it in the code behind. Having worked with WPF, I know that such errors are caught at compile time. I am surprised why Silverlight compiler missed this.
With the Silverlight 2.0 Beta 2 now available, I finally decided to take the plunge. So far, I had been focusing on WPF, but knowing that Silverlight is the next big wave for RIA development, I could not stay away longer.
A few fellow colleagues have been working with Silverlight 2.0 Beta 1 and I heard from them that Beta 2 has been a bit of a challenge considering the various breaking changes from Beta 1 to Beta 2. Fortunately these were mostly functional/API issues with Silverlight controls and not like the interesting issue faced by my colleague Kishore with his attempt to work with .net 3.5 SP1 beta. Since I was new, I started with the Comparis Silverlight Challenge Application and the HOL created by Swiss MSDN Team.
Continue reading "Migrating Comparis Silverlight Challenge App to Silverlight 2.0 Beta 2" »
If you have been following Silverlight, you would already be aware that Microsoft released Beta 2 of Silverlight 2.0 last weekend. Check out more details on Scott's blog. The release also includes release of updated extension for VS 2008, Expression Blend 2.5 June Preview and DeepZoom composer. Also check out here for feature listing.
However moving from Beta 1 to 2 may not be a smooth sailing as there are many breaking changes. Read about them here. The list has been further updated and available here.
Recently while answering a query on WPF forum, I found an interesting behavior. In case you have two way binding set on a property, the property to which you bind too, updates before the property to which the bound value is assigned. Check out discussion and a sample on this here.
This seems to similar to another behavior with ComboBox that i had described here.
When programming with the Combobox and handling its SelectionChangedEvent, you need to be a bit careful. The general expectation will be that when this event fires, the various properties like SelectionBoxItem or Text will give the new value, but that isn't the case.
The SelectedIndex does points to the newly selected item index, but the values of properties like SelectionBoxItem or Text still point to the old values and the new one selection hasn't really been updated. It is only after the event handler code that you write has completed execution that these properties update.
Windows 7 is the next generation Windows operating system what Microsoft is working on and is expected to hit the market somewhere in 2010. This is probably something that all of us know. But what are the key features that Windows 7 will offer? That is a question to which there aren't many answers today.
With the advent of .net, Microsoft had also brought in a new era of beta bits, CTP bits and RC bits. In a way this helped the community keep a close watch on what's coming and plan ahead. Many would have already started implementing production ready applications even before the particular product would RTM. I had written about my thoughts on this trend here.
It has been a pretty hectic last month with lot of travel. I had been travelling to synch up with our teams working from other DCs and then a week long training at our Mysore campus (I just love it !) and finally topped it with a week long vacation.
With a school going kid, whether i like it or not, summer is the time to take time off and be in Delhi (fortunately it wasn't very hot this time, due to lot of unexpected rains). Well, I am back now and will try to get back with new blog entries.
Thanks for being patient
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 !" »
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.
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.
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.
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" »
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" »
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.
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.
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" »
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>
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" »
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" »
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>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" »
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" »
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.
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.
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"
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.
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.
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.
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.
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.
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.
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" »
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" »
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 !
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
Recently I was trying to work with LocBAML (default installation location - C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\WPFSamples\GlobalizationLocalization\LocBaml) to generate localized version of my WPF application. Things worked fine, but I did observe a few differences from what is documented on MSDN Site and this another detailed article. Two main observations
The other day a colleague asked about how to provide information for the "User" column in the Event log. The EventLog.WriteEntry method has various overloads, but none that allows you to pass the user details.
There is an EventLogEntry class also that .NET provides, which has a UserName member, but it is read only property and is used to query event entries from the log. This means that by using .NET APIs there isn't a way to provide the user name for event log entries.
To ensure optimum application performance in terms of throughput and processing speed, performance tuning can play a critical role. However, it could entail risks and unforeseen costs without the right approach. In order to reduce risks and costs, performance tuning should be treated as an integral part of a project life cycle. In most projects, however, it is conducted during the final stages of testing or when customers complain about performance post production deployment.
Performance tuning of .NET 2.0 applications can be achieved using Visual Studio 2005 tools. In this paper, I explore these tools and also provide guidelines on how to use them.
[Updated: 28th January 2008] This and other Infosys papers/handbooks on MS technologies can be found here.
The other day I decided to try my hands on building a Silverlight application using the Alpha 1.1 refresh on my newly downloaded VS 2008 Beta 2 VPC. I built an extremely trivial application with a text box to display some text. However on running, I didn't see anything and didn't get any error as well. I played around with the text foreground color, visibility and opacity properties but no luck. I could see things fine in the Expression Blend.
So what was wrong and why was IE not displaying it. I then found that this is due to the Enhanced security configuration for IE. I didn't get any warning. Probably when the VPC was built the Continue to prompt when Web site content is blocked option was unchecked !! Anyway, removing the enhanced security configuration did the trick and the application started to work properly.
I wanted to play around with AJAX and hence downloaded the Extensions and the ToolKit. I created a new ASP.NET AJAX Enabled Web Site and after adding the Update Panel to update a label control, I hit F5. Surprisingly, I got an error when trying to debug.
Continue reading "VS 2005 Debugging Issue with AJAX Applications on IIS7 on Vista" »
In my earlier blog I had talked about how to work with AppDomains and the issues I had faced. I had a chance to interact with Hua Wang from Microsoft and it was very enlightening.
There are specific things that need to be taken care when creating and destroying AppDomains in WPF. .NET framework 3.0 supports new APIs for this purpose and these are to account for the threading model of WPF.
Recently for a sample application I was building in WPF, I had to find the location of a button control on the window. Playing around with Button.Margin didn't help much since it gave the position with reference to the immediate parent. So if the button was inside a Grid and the grid itself inside say a StackPanel, the values were incorrect.
Searching on the forums, I got some ideas and following is what worked for me
GeneralTransform transform = button1.TransformToAncestor(this);
Point rootPoint = transform.Transform(new Point(0, 0));
button1 is the control for whom I wanted to find the location. The this represents the top level window. The value obtained in rootPoint is the Left and Top cordinates of the button with respect to the top level window. Adding button's height and width will give the complete location details.
In my earlier blog I had discussed about creating a new AppDomain. You may have a need to track the loading of assemblies in this newly created AppDomain. AppDomain class provides an event for this purpose called AssemblyLoad. However when I tried to work with it, I never got the event to fire up.
The catch is that the event handler needs to be static. When I had added the event handler via VS 2005 by using the tip that appears once you type "+=" after an event, it added the event handler as private void and missed the "static" qualifier. Due to this the event handler was not getting called. Once I added this, it started to work like a breeze. The handler signature will look something like the following
static void domain_AssemblyLoad(object sender, AssemblyLoadEventArgs args)
{
//add code to handle assembly load event here
}
If you have worked with .NET 2.0 and VS 2005 and then move onto .NET 3.0 and WPF, be careful of the default assembly version. From .NET 1.1 to .NET 2.0, a change was made to default the assembly version to 1.0.0.0 in the AssemblyInfo.cs file, since the C# compiler would otherwise keep incrementing these values everytime you hit "build".
Seems like with for WPF in .NET 3.0, this change has been reversed, if you are working with the WPF Extensions running with VS 2005. The WCF and WF extensions still use 1.0.0.0 as the default version. So if you are working with WPF extensions, be careful, else you will end up having always changing version numbers.
However this seems to have been fixed in Orcas. I checked with Orcas Beta 1 and the version number for WPF apps has again been defaulted to 1.0.0.0.
We all have read that AppDomains are light weight processes that .net uses to run applications, but I hardly ever played with AppDomains directly. Recently I decided to give this a try and following are my findings. If you want to get more information on AppDomains, check this excellent blog by Chris Brumme.
Continue reading "Creating and Working with Applications in AppDomains" »
Sometime back I had blogged about how to send messages to remote private queues. There were a few queries on how to read from remote queue as well.
To me it should have worked by using the MessageQueue.Receive API instead of .Send. I decided to give this a try anyway and it indeed is as trivial as that. However a few things to take care while trying to get this working.
Continue reading "MSMQ - Receiving messages from remote private queues" »
In my earlier blog I had looked at March CTP of Orcas and talked about performance reports and performance comparison reports and raised a few issues.
I downloaded and started to play around with Orcas Beta 1 today and thought of checking the performance comparison report to start with. I ran the same code as I did earlier and compared the reports.
Continue reading "VSTS (Orcas Beta 1) Profiler - Comparing Performance Reports" »
Earlier today someone asked me where are the project properties of ASP.NET 2.0 web site stored? This seemingly simple question proved lot more difficult to answer since there is no .CSPROJ file for the web site (I was working with C# and hence .CSPROJ).
I started by creating a new ASP.NET 2.0 Web site project (you can create this on HTTP or file system, the behavior is the same). After that I went to the project properties dialog and modified a few properties like in Start action group, I modified Specific page to some value dummy value and in the Server group I modifed to point to some custom server. Do note that the custom server option can't be set if you created the web site on HTTP.
Continue reading "Where are ASP.NET 2.0 Website Project Properties Stored?" »
The other day a colleague asked if there was a way he could work with different versions of the same assembly in his code i.e. could he invoke say Method A on Version 1.0 and Method B on Version 2.0 of the same assembly?
I was initially surprised as to why he would want to do that? People ask about being able to automatically load newer version of the assembly with the application or in case of .net being able to load an assembly built with .net framework 1.1 in an application built with .net framework 2.0, but usually not this.
Continue reading "Loading Multiple Versions of same Assembly" »
Most people, when hear Vista, think about Aero glass affect, great new set of icons and wallpapers and UAC. However there is more to Vista than this. Mark Russinovich in 3 part series on Technet Magazine covers key features of Vista Kernel. Gives good insight into the features and make really interesting reading. Check them out
I recently came across this blog by Ianhu and was interested to explore the comparsion of performance reports.
Being able to compare reports from two performance runs is very important since without it, it becomes very difficult to figure out if one has been able to make improvements or not post the code changes. Hence I created a dummy application that created an array of 200000 strings and then wrote it on the Console. I wanted to see the impact of using an object based ArrayList or a generics based List<T>.
Continue reading "VSTS (Orcas March CTP) Profiler - Comparing Performance Reports" »
When working with WPF applications, display images is a breeze. The Image control provides rich features to display images of various formats like JPEG, PNG, ICO, BMP, GIF etc. Displaying an image is as simple as setting the Image.Source property to the appropriate image file path. No special coding is required to work with different file formats.
<Image Name="icoDisplay" Source="myfile.jpg" />
Ofcourse you need to worry about other aspects like location of the Image control, its size and also setting the Stretch property to appropriately display the image. I haven't shown all that here for sake of simplicity.
Official name for WPF/E is now Microsoft Silverlight (http://blogs.msdn.com/mpowell/archive/2007/04/15/wpf-e-is-now-silverlight.aspx).
Interesting point on agHost.js name linking with silver and hosting - http://blogs.msdn.com/bardak/archive/2007/04/15/the-story-about-silverlight-and-aghost-js.aspx
We had some interesting discussions internally, post my earlier blog on 250 threads/CPU. There are some confusions also on default values and what comes from thread pool etc. I spent a little bit more time on basics and document them.
The ThreadPool contains threads marked as worker threads and IO threads (completion ports). The default max value for these are 25 threads / per process / per CPU. The default min values for these is #CPU, so on a single CPU machine it will be 1.
Earlier today a colleague asked how do Services and Applications talk to each other in Vista and I said, "the way they used to earlier". I wasn't aware of Session 0 and Session 1 concept till now. He pointed me to this MSDN article that explains what this new concept of Session 0 in Vista is all about.
This essentially is to prevent direct access to services from applications and thus prevent hacker to elevate their own security priviledges. Some information around this is here and on this Channel 9 video. A white paper on impact of session 0 on services and drivers is also available.
[Edited April 16, 2007] Found some tips to communicating with Session 0 services here.
Recently while working on a project, I came across an interesting behavior of Assembly.Load method and its different overloads. I specifically tried with Assembly.Load(AssemblyName) and Assembly.Load(string) overloads.
My testing showed that the overload that accepted a string depended on the value of Environment.CurrentDirectory. Usually when using Assembly.Load method, one would expect the assembly to be loaded from the application's root folder.
Continue reading "Inconsistent Behavior between Assembly.Load overloads" »
When working with multi-threaded applications, we all know that we should usually try and work with the ThreadPool class as the first option. In case we have a case where the work done by a thread is long (couple of seconds), we should then look at creating a new thread to avoid starving threads from the pool and behave like a good .net managed citizen.
However there have been issues with this due to the limit of 25 threads/CPU with .NET 1.1, especially for web based applications. The default limit for minimum threads was also set to be equal to #CPU. Note only this caused lot of contention issues, but also required people to play around with the values in the ASP.NET configuration files.
I have been playing around with Animation features of WPF and it has indeed made life easy for developers to build some cool animations quickly. Even if you don't go the extent of using Expression Studio to build complex animations, basic things can be easily done with WPF, XAML and code behind itself.
Whatever animation logic we write in XAML, we can write in code behind also. Though in code behind, this takes lot more lines of code and isn't that easily readable and understandable as it is XAML. In one of the samples that I was building, I had a requirement to animate a control, based on some existing data values.
I have been extremely used to the way event handlers are added to the code behind files, be it web application or winform application, when working with Visual Studio. This could be done either by double clicking the form/control whose event you want to handle or go the event listing in the properties windows, pick the event and double click there.
However the same doesn't works for WPF applications. It doesn't work using the currently available WPF extensions that work with VS2005 or with March CTP of Orcas.
Continue reading "Adding Event handlers for controls in WPF (XAML) applications" »
User controls are an essential part of writing Windows/Web applications. The other day I was trying to get a WPF user control (XAML) added to my WPF Window and was running into issues.
I am working on RTM Windows Vista Ultimate with VS2005 SP1 (with patch for Vista), .net fwk 3.0 RTM and November 2006 CTP of WPF extensions for VS. The scenario is as below.
Continue reading "Using User Control in Windows WPF (XAML) Application" »
We recently launched the BizTalk Server 2006 Handbook that covers the key new features in BizTalk and our viewpoints around these features. Other books on VSTS and Features on .NET 2.0 are also published by my colleagues. You can find these at
http://www.infosys.com/technology/books.asp
Recently on a project support we faced an issue in using the BizTalk Rules Engine. It so happened that the code was getting generated via some XSD files that were themselves based on some legacy code, which we had no control on.
This code generated, thus contained classes with similar names in different namespaces. The project configuration requirements, forced all these to be in a single assembly and when this assembly was loaded in Business Rules Composer application, it failed to recognize the different namespaces.
Continue reading "BizTalk Business Rules Composer's Namespace issue" »
With the change in Daylight Saving Time as mandated by the Energy Policy Act 2005, systems running on BizTalk Server 2004 and 2006 may be impacted. Microsoft has published hot fixes for the same. Do review these and apply as applicable.
BizTalk Server 2004 - http://support.microsoft.com/kb/931960
BizTalk Server 2006 - http://support.microsoft.com/kb/931961
Recently while working on my Vista machine, I was was working on a ASP.NET Web site and I wanted to have a colleage of mine have a look. Like always, I mailed him the URL and waited for him to view it and get back. To my surprise, he reverted stating he can't view it.
The error he was getting was "Internet Explorer cannot display the webpage". This was surprising since I was able to view the site locally on the Vista machine without any issues. This meant that IIS was configured and running properly.
Continue reading "IIS 7 hosted sites not accessible from remote machines" »
Recently when working on an application, I was playing around with writing custom http handlers. There is nothing new in that lots has been written about how to build and configure custom http handlers. So when after writing this I decided to configure it in IIS 7 on my Vista machine, I was pleasently surprised to see that I was lost !
IIS 7 UI has changed noticeably from its earlier versions and when I wanted to configure the file extension I wanted my custom handler to work with, I didn't know what to do.
Continue reading "Configuring Custom Http Handler in IIS 7" »
SQL Server 2005 SP2 is now available. Download it from here - http://www.microsoft.com/downloads/details.aspx?FamilyId=d07219b2-1e23-49c8-8f0c-63fa18f26d3a&DisplayLang=en
For other SQL Server 2005 related files, check - http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/servicepacks/sp2.mspx
Recently a friend was facing issues in sending messages to a private msmq queue on a remote machine. I had worked on this about 4-5 years back and I recalled that I was able to work with remote private queues. So I decided to give it a try again.
Following are things that I found.
Continue reading "MSMQ - Sending messages to remote private queues" »
.NET framework 2.0 introduced a new feature called Anonymous methods via the delegate keyword. Some more details on this can be found in this MSDN Magazine article.
Working with anonymous methods can be a bit confusing and also make the code a bit difficult to read. Recently a colleague of mine, Vinay, however showed another interesting class and method naming convention.
I was trying to build a sample that had a WCF service consuming an input message from MSMQ. Post writing the necessary code when I ran the service and waited for it to pick up the message from MSMQ, nothing happened.
The message was not getting picked up and I wasn't get any exception or an error logged in event log. I didn't know what to do. Since I had used a transactional queue, and the message continued to sit there, I knew this meant that something went wrong while reading the message, but what?
Continue reading "Finding deserialization problems when using MSMQ with WCF" »
The other day a friend, having read my earlier blog on Settings in .net fwk 2.0 asked me a question about user settings. He had built an application where he was dealing with user settings and though he was getting the required behavior of user settings getting updated everytime he changed some value and using the new value on next load of the application also, but the mystery was he wasn't able to locate where the values were being saved?
I decided to look into this and created a small windows application which had a text box to input new values, a button to assign them and another button whose text would get updated based on the value in the text box. This value, I also storted as user settings by calling Setting.Default.Save(). I ran the application, set a new text and hit the update button and closed the application. When I ran the application again, I did see the button displaying the new value i had assigned in my previous run.
Earlier today I decided to try my hands at building a Windows Communication Foundation (WCF) service on my Vista machine. Since Vista (RTM) comes pre-installed with .net framework 3.0, the necessary components for WCF are already on the machine.
However to work with VS2005 and be able to create WCF based projects, you still need to install the WCF extensions. You can get the necessary files from here - http://www.netfx3.com/blogs/technology_news_and_announcements/archive/2006/12/06/net-framework-3-0-has-been-released.aspx
In one of my previous blogs - http://infosysblogs.com/microsoft/2006/10/aspnet_20_ajax_extensions_atla.html, I had provided details about invoking web services, without worrying about the hassles of creating proxy and all, from the client side of the ASP.NET applications, using ASP.NET 2.0 AJAX extensions. And I had also mentioned that client-side invocation of the remote (cross-domain) web services is forbidden because of security implications surrounding that. In order to invoke a remote web service, we have to use a local web service, that acts as a bridge service, which in turn invokes the remote web service. I had used such a bridge web service to invoke a remote web service http://www.xmlme.com/WSShakespeare.asmx – Shakespeare quotes web service – that provides us back with the timeless quotes from not so forgettable protagonists of Shakespeare’s works.
Continue reading "Integrating WPF/E content in ASP.NET AJAX 1.0 based application,,," »
February 2007 MSDN Magazine contains a good introduction to WCF Software factory by Aaron Skonnard. You can find the article here - http://msdn.microsoft.com/msdnmag/issues/07/02/ServiceStation/default.aspx. The December edition had an article on Web services Software Factory (http://msdn.microsoft.com/msdnmag/issues/06/12/ServiceStation/).
The Service Factory is available on code plex site here - http://www.codeplex.com/servicefactory.
Recently someone internally working on BizTalk 2004 project reported the following error when installing SP2.
---------------------------It turns out the solution is pretty simple. Ensure you install SP1 for BizTalk 2004 prior to installing SP2
I recently came across this nice article on how to get the UAC elevation request working for our own applications in Vista. There are however one or two additional observations that I wanted to capture.
First is that the behavior is seen when directly executing the application. If you compile and debug via VS2005, you won't see the elevation request poping up. Additionally, if you run your VS2005 as Administrator, then the application will also run in that mode and hence the label will display "Yup".
The other observation is that if you disable the UAC via control panel for your login, the elevation request popup won't occur when you run the application (outside of VS also) or for any other application for that matter. This is also indicated by a regular icon for the application and the security shield is no longer visible.
As people start to write code for BizTalk 2006, it is also expected that people will reuse their existing code developed for BizTalk 2004 and use the Visual Studio 2005's upgrade feature to upgrade the code. Here I am not discussing about the upgrade as such, but more from the deployment after the upgrade.
When you build and deploy a BizTalk 2004 code upgraded to BizTalk 2006, you might get an error as - "error DEPLOY: The database or the database version is incompatible with the installed version of this product."
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.
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 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.
Continue reading "Visual Studio 2005 and SQL 2005 on Vista RTM" »
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.
Continue reading "BizTalk BRE - Is it true Business Users Rules Engine?" »
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.
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.
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.
Continue reading "Alpha, Beta, CTP, RC, RTM - Is this good?" »
Some time back while working on a project we had requirement to do input data cleansing. The input would be a known XML format and could come from know sources. However each source could have used a different string representation than a standard one and hence it was required to fix this prior to working with the XML. For example we would want the color to be represented as "green", while the input could contain GREEN, GRN, grn etc.
There were some common conversions which were to be done for any source. However some conversions were only to be done for specific sources and additionally support was required to add new sources at any time without rebuilding the application. We discussed and decided that Mapping won't work since, one we needed a generic string replacement as against specific XML node manipulation and two we wanted dynamic addition of sources.
Continue reading "BizTalk - String manipulation using Business Rules Engine" »
We all know that when working with Winform applications and threads, we need to be careful about accessing the UI controls. These controls are meant to be accessed only on the thread that built them, which in this case is the primary application thread.
In multithreaded applications, when additional threads are used to perform background jobs to ensure that the UI remains responsive, one has to be careful about updating the controls on the form. There are articles already, that talk about how to address this problem. Check here.
Recently we had concluded doing a performance comparison between the latest BizTalk Server 2006 and the previous 2004 version. Needless to say that the results were in favor of BizTalk Server 2006 running on SQL Server 2005.
We were amazed at the percentage performance improvement that this new combination delivered in certain specific scenarios. For more details check here.
Working with Configuration files in .net fwk 1.1 was additionally supported by the Configuration block available as part of Enterprise Library (EL). With the release of .net fwk 2.0 and the introduction of System.Configuration subsystem, this is now becoming the way to work with configuration files. Hence EL 2.0 doesn't include a new Configuration block any more. Check this.
Working with System.Configuration via the Settings is quite simple with Visual Studio (VS) 2005. Check this article in case you need to know how to go about using it.
Recently when trying to work programmatically with BizTalk rules, I noticed that the RuleSetDeploymentDriver class appears twice, once in the Microsoft.RuleEngine namespace and once in Microsoft.BizTalk.RuleEngineExtensions. Not able to figure out what to use where, I dropped a mail to Sreedhar. In his response he indicated that when calling the policies from a generic Winform application, one should use Microsoft.RuleEngine.RuleSetDeploymentDriver and when working with BizTalk, one should use Microsoft.BizTalk.RuleEngineExtensions.RuleSetDeploymentDriver.
He said that he will update the documentation and I did notice a new blog on his site about this.
Recently a person put forth a query that he has written a custom control, overridden from an existing control, and using it in a Winform application. He was assigning some default values for some of the properties in the control's constructor. First time he added that control to the Winform, it showed the default values properly, however when we edited the custom control, recompiled and ran the Winform application again, the control instance on the form still showed the old value.
What was he doing wrong? For some of the properties of the base control like Text, this was working but for some like BackColor, this wasn't.
Continue reading "Custom Control's Default Property Value" »
Mohan commented on my earlier blog and asked my views on BizTalk as an Enterprise Service Bus (ESB). My take is that if we look at the functionality that ESBs are meant to provide, BizTalk does fit in pretty well, however if we look at some of the deployment considerations (like feature specific deployment), then BizTalk doesn't fit in, since we have to install the entire package. We can however, selectively enable certain funtionality by appropriate configuration.
Considering the better processing power we can get these days, I would tend to put more weightage to the features than deployment aspects. The deployment requirements might result in higher costs, but then there could be various other factors forcing organizations to anyway go in for high end servers.
In my previous blogs “Asynchronous Programming Model in .NET Framework 2.0 Part I and Part II, I had explained the basics of EBAPM and about various approaches to call an operation in a separate thread. In this final sequel to those blogs, I am going to explain how an operation should be designed so that it would be invoked asynchronously based on EBAPM. It is better to recollect that EBAPM provides more flexibility to an asynchronous operation. EBAPM provides flexibility in canceling an ongoing asynchronous operation. It also supports retrieving incremental result and status from an asynchronous operation. Apart from those, it is possible to invoke the same operation more than once asynchronously if application logic requires that.
To explain how to code an operation to provide such flexibilities, I have created a simple application that retrieves the private data such as address, credit card history, employment details, medical history and travel details of a person based on the unique identification of person such as SSN.
Continue reading "Asynchronous Programming Model in .NET Framework 2.0 - Part III,,," »
Let us continue from where we left off in “Asynchronous Programming Model in .NET Framework 2.0 – Part I”. But, in this blog, instead of delving deep into EBAPM implementation details, I will step into various ways to achieve asynchronous invocation of method calls, in .NET Framework 2.0. That will give us better perspective of Asynchronous programming model. Asynchronous programming model can be simplistically defined as invoking methods in separate threads from main UI or primary threads.
.NET, being a rich framework, it provides more than one option to achieve it. In fact, a few options that we may be familiar with, even without knowing that they invoke methods in different threads than the main ones.
Asynchronous invocation is possible through the following approaches, apart from the ones that we have seen in my previous blog,
Continue reading "Asynchronous Programming Model in .NET Framework 2.0 - Part II,,," »
I recently downloaded the UK SDC BizTalk 2006 Documenter and ran it on my local BizTalk installation. The output CHM is amazing and captures quite a bit of information.
The good part is that it is able to provide details like maps, schemas, variables, messages, ports etc within an orchestration. This helps when you have multiple orchestrations within a single application, since the BizTalk Admin console groups only at application level and not at individual orchestration level inside it.
When working with BizTalk's Business Rules Engine (BRE), one of the issues all face is that once published/deployed, vocabularies and policies become immutable. For a project that is in development this can cause lot of pain since there will be unnecessarily too many versions as the vocabularies and policies evolve. While taking this to production we can definitely pick the latest and final versions and deploy them, but to help make development more easy we can do a bit of under the hood work with the BRE database.
Even though I haven't faced any issues in the rules execution by following the approach discussed below, I will strongly discourage using this on Production systems.
Continue reading "BizTalk - Edit and re-publish Policies and Vocabularies" »
As part of our blogs on Microsoft products and technologies, as mentioned by Balaji, I will be focusing on BizTalk Server 2006.
My name is Atul Gupta and I am Senior Technical Architect working with the Microsoft group in Infosys. I have been working on Microsoft based technologies for more than 11 years now. Have had exposure to C, C++, MFC, COM, DCOM, .Net 1.1, ASP.NET 1.1, .Net 2.0, ASP.NET 2.0, Winforms, SmartClient etc. On the server side, I have worked with BizTalk, Commerce Server and SQL server. I am also Microsoft MVP.
Looking forward to having interesting discussions on this blog!