Archive for the ‘.NET’ Category

System.Web.VirtualPathUtility.ToAbsolute("~")  does the job of ResolveUrl on the server side.

I recently upgraded my VS2008 to Service Pack 1 which was a combined update to .NET Framework 3.5 also to SP1. I did update to try my hand in ASP.NET MVC architecture.

I am working on a couple of projects that are using ASP.NET AJAX these days. And after doing this update I started noticing strange issues in pages using AJAX extenders.

First I noticed that the pages containing the AJAX extensions were throwing strange errors. They were usually in the form of “Cannot set value True for property enabled”. This caught me quite by surprise and made me review the HTML over and over.

Once I was sure that there was nothing wrong in the way that the properties were set, and these were pages that were working perfectly, I realized something would have happened after applying the service pack. But I could not find a lot of useful information directly documenting this issue. Most of the issues were reported on the user controls behaving in a similar manner.

After quite a bit of Googling and putting 2 and 2 together I managed to solve it by applying ANOTHER hotfix. This is where I found most of the info from:

This is the hotfix that solved it for me:

Hope this helps someone out there to avoid the mess I was in which resulted in a few hours worth of work just before a major deadline!

After a long silence on the moBlog front I finally got sometime to work on moBlog. The following are the enhancements done to moBlog:

Ability to work with published posts 
Now moBlog allows you to retrieve the latest 20 published posts in your blog. After retrieval, you can amend and re-publish them via moBlog. You can also delete a published post after retrieval.  You can retrieve the published posts via the Open Posts option. In that screen there is a drop down on top of the screen with the following options:

  • Saved Posts – locally saved un-published posts
  • Published Posts – retrieves the latest 20 posts published on your blog.

Please note that moBlog does not locally store the published posts, so every time you choose the Published Posts option, moBlog retrieves the posts directly from your blog. So if you are charged for the amount of data you are using, be mindful of that.

Editing Enhancements
Now moBlog allows you to bold, underline and italicize your post content body. moBlog would insert HTML tags to the body so i advice you to do these actions at last otherwise your body will start to look like a HTML code!

Removal of ‘Posted by moBlog’
I used this pingback to promote moBlog. But since most of you have complained about it, I decided to remove it. Besides I could not figure out the actual visitors to my site and the pingbacks!

Hope everyone would give this new release a try as well. I have done a bit of tweaks to make blogging from moBlog easier and given more power to authors to post better formatted posts. I personally am not very fond of the text editors that are being used on moBlog, but in the absense of a better, more powerful and FREE editor control that can be used on .NETCF, I am left with no other alternatives. If someone can point me towards an editor that can be used,  I’ll be happy to incorporate that into moBlog.

Please download release 2.2 from HERE

Happy moBile Blogging with moBlog!

I have been an ardent and a loyal Windows Mobile user. There were several reasons for this loyalty. I come from a development background that is heavily biased towards Microsoft (read .NET). With this back ground I found it quite easy to develop a few applications for the Windows Mobile platform using .NETCF. So whenever I had the option to upgrade my mobile, I went for a Windows Mobile device.

But since I was given a Blackberry Curve in my current job I have fallen in love with the Blackberry. One of the facts that I love about it is the fact that the OS is more biased towards the usual phone style. Windows Mobile OS is more biased towards the usual computer navigation style.

And the other thing is it is definitely a lot better for Email on the GO. With Windows Mobile, you need to initiate an operation to check for new Mail. I know there are solutions to provide Push Email on Windows MObile as well, but these usually require special software and additional configurations to get them to work. At least I never could get Push Email to work on my earlier Windows Mobile device.

And the BB is a lot lighter and sleeker than most of the Windows Mobile devices. It is definitely aesthetically more pleasing than the Windows Mobile device I had and a hell of a lot lighter.

My next step is to port my mobile application development knowledge to the BB platform so I can write a few apps for the device. Most of the applications that were a bit hard to find for the Windows Mobile devices were easy to find for the BB. But still there are a few that I could not still find. So hopefully I will be able to fill that gap, starting off with the applications that I would like to have on my BB!

My only hope was that there was some kind of an emulator which allows to run .NETCF applications on the BB. Now that would be superb. That way, I wont have to learn java to write apps for my BB. Do you know of anything like that?

A couple of weeks ago I got a new laptop from office. It is a Dell Latitude D630 running Vista Business. I didn’t get much time to setup the machine, just did the bare essentials to do my day to day work. And during the last long weekend, since I had sometime in my hands, I started setting up my development environments on it.

I started off with Visual Studio 2003 as the main solution that I need to support on my new job is a ASP.NET 1.1 application. Through officially VS2003 is not supported on Vista, I managed to install and run it on my machine. I still havent done any debugging or anything yet, but hope I wont face much issues. In case I do, i do have another laptop running Windows XP, on which I have installed VS2003.

Then came my favourite IDE, VS2005. Installed the Professional Edition and WM5 SDK’s and tried to do some changes to moBlog. Managed to do the changes, but was not able to test it as I could not get the emulator to connect to the Internet. Also, since I have switched my mobile also to a Blackberry I did not have a device to test it on either.

Ended up installing an untold number of software on my laptop including Virtual PC, patches, WM6 SDK’s, you name it. But still I cannot get my emulator to connect to the Internet. The Windows Mobile Device Center (WMDC) only started to recognize the cradling of the emulator after I installed MS Virtual PC. Now, when I cradle the emulator, WMDC recognizes and initiated a connection. But still I cannot browse the Internet from the emulator.

When I try to browse a web site from it, I get a message saying that “Page cannot be found. Check the name and try again”. From moBlog, I get a exception saying that the remote host name cannot be resolved. I know the issue is with the connectivity between the emulator and machine. But right now I have run out of ideas. And I could not find much information on the Internet regarding connecting emulators to Internet using WMDC. All the articles refer to ActiveSync. But the information is straight forward enough to apply to WMDC, unless there are any specific things that you need to do with WMDC.

Any ideas or suggestions are welcome!

UPDATE: I allowed WMDHost (C:\Windows\WindowsMobile\WmdHost.exe) through the firewall and it happened to solve the problem.  Voila! Now my .NETCF programs can connect to the Internet through the Emulator!

moBlog has had a pretty good ride. There has been about 1000 downloads of both Pocket PC and Smartphone versions.

As I mentioned in my previous post, I fixed the issues and performed a limited testing. By limited what I meant was the PPC version was tested on a device, but the Smartphone version was only tested on the emulator.

So if you want to test the new and improved moBlog, please download the required versions from the links in this page.

Posted from moBlog – mobile blogging tool for Windows Mobile

This post is to test the latest enhancements for moBlog for Smartphone with

These enhancements came about as a result of listening to user feedback. Though moBlog only has a small user base, they have been pretty active in using the application, suggesting improvements and finding bugs, all of which would not have been possible, specially with the Smartphone version as I do not own an actual device.

I was earlier paranoid about releasing the software as I had not tested it on an actual device. But after reading “Getting Real” by 37Signals and also due to the limitation of me not owning a Smartphone device I was compelled to release it only after testing it on the emulator. And the user community has been wonderful in reporting issues and suggesting improvements for the application after test driving it in various devices.

Thank you Nick, Pat and all the others for finding bugs and suggesting improvements. Please do keep on sending your suggestions.

Let’s make moBlog THE mobile blogging software for Windows Mobile!

Posted from moBlog – mobile blogging tool for Windows Mobile

There were several requests for a Smart Phone version of moBlog. Since the original moBlog application was designed for the Pocket PC’s form factor and it had used a few PPC controls, it was not working on Smartphones. And I heard your requests for a smartphone edition of moBlog and today I am happy to announce the release of the moBlog Smpartphone Edition!

I know this release was a little bit behind the PPC editions, but the reason was that I did not want to release a stripped down edition for the Smartphones. This released edition supports all the features of the moBlog including support for embedding images for blog posts!

So those of you who were using smartphones, go ahead, give it a spin and let me know what you think.

Get moBlog for Smartphones here

moBlog 2.1.0 had an error when you were trying to setup a profile for your account. This was due to a careless error on my part. Thanks so much to Hans and Pat who pointed out the error to me. I have now fixed it and have released version 2.1.1.

Enjoy moBlog with photo blogging support!

moBlog now supports Photo Blogging for WordPress and Blogger platforms!

It was the most requested feature for moBlog! Support for posting photos taken with device camera’s. As far as I know there aren’t that many mobile blogging applications that support Photo Blogging! Hope this feature will make moBlog THE mobile blogging application!

All you smartphone users, yes I hear you. You need a moBlog version that works on Smartphones! Hey, I’m on it! Your patience will be rewarded pretty soon! Now that moBlog is complete with photo blogging, I am on the task of converting it to work on Smartphones!

As usual, moBlog is still in beta. So please let me know if you come across any issues or have any comments! Looking forward to hearing from all of you!

Posted from moBlog – mobile blogging tool for Windows Mobile

The most requested feature for moBlog has been the ability to upload photos from the devices. Since most devices are equipped with a camera it makes perfect sense to enable photo blogging on moBlog as it will give people a quick way to get their photos in the devices to their blogs.

Of the blogging platforms that moBlog the easiest to get photo blogging working on was the on WordPress. WordPress supports Metaweblog API’s newMediaObject method and it worked like a charm. You can see the first photo uploaded from moBlog on the previous post!

Blogger now hosts the photos uploaded to the blogs on Picasa Web Albums. The documentation vaguely mentioned something about Blogger creating a default album on Picasa for Blogger photos, but this web album is not accessible via the API. Hence I devised a crude method of creating an album for moBlog and uploading the photos to that album!

But the biggest disappointment was Live Spaces. Though they support Metaweblog API, their support of that is limited. Specifically they do not support the newMediaObject method. That was a pretty bad decision from the Live Spaces team. If they support a particular API, either MetaWebLog API or ATOM API, they have to support it completely. To make matters worse they do not provide any API to upload photos to the Live Spaces Blog.

I know that Windows Live Writer supports uploading photos to Live Spaces blog posts and similar to Google approach, those photos are stored in a seperate album on Live Spaces. But my problem was I was not able to find any documentation on the approach taken by Live Writer.

In any case, a new version of moBlog will be released in a couple of days with photo blogging support on Blogger and WordPress blogs. Along with that I will be releasing a few more enhancements to the post composition screen with the option to decorate the body of the blog posts.

Look forward to an enhanced moBlog!

Posted from moBlog – mobile blogging tool for Windows Mobile

Testing photo blogging from moBlog!

Posted from moBlog – mobile blogging tool for Windows Mobile

I have been thinking about what to do next with moBlog. Since the initial release and the subsequent bug fixed version, I have been thinking about where I wanted to take moBlog.

There have been a particular feature request from the those who gave it a try. It is to enable support for posting images to their blogs. Since most of the devices come equipped with a camera this makes perfect sense as it will be great to post those pictures that you capture from your phone. Actually it was something that I also thought of doing, even initially, but differed as I wanted to get the application out as soon as possible. So it is definitely at the top of planned features list.

I have a few other features that I wanted to incorporate as well. If you have used moBlog with WordPress or Livespaces you would have noticed that moBlog currently does not support tags (or labels) for that. Tags are only supported for Blogger posts. This is because I could not figure out, at least with the client code I was using for MetaWebLog API, how to pass the Tags to the API. So this is something I want to incorporate on to a next version: option to tag wordpress/livespaces posts.

Currently moBlog is a .NET Compact Framework application. This deprives all those non Windows Mobile device users of the option to use a great mobile blogging application (do you notice me blowing my own horn here??). So I was thinking about hacking out a moBlog J2ME version as well! Now that is easier said than being done as I have not coded Java in a long long time, let alone tackle the intricacies of J2ME as well. But I think that will be a pretty good challenge for me to get on to a bit of Java coding. I am hoping that coding on Java has become as easy as it is to code on .NET. After all, Java lobby kept on saying that C# was a copy of Java, so I am hoping that those similarities will work in favor for me, coming from a C# background.

But what I actually do next will more or less depend on the user feedback that I get over the next couple of days. Either way, I think an enhanced version for WM with option to upload images will come out way before any J2ME  version sees the light of the day.  But if the demand for a J2ME version out weighs the enhancements for the WM version, I might consider dedicating my time on to that. What do you say?

Since the release of moBlog most of the queries were with how to setup the application. It was evident that a help page was the order of the day.

Today I took the time to write a brief help page on setting up profiles, and also on settings to connect through a Proxy Server (in case you didn’t know, moBlog has support for connection through a Proxy Server!). Please find the help page here (moBlog Help)

As always any comments are welcome, good or bad!

moBlog has had a another release within the space of 2 days.

Since the initial release of moBlog, there has been over 150 downloads. Thank you for all those who gave it a spin. And a couple of bugs were also reported. As a token of appreciation to all those who gave it a spin, I fixed the bugs as quickly as possible and made another release, in order to minimize the inconveniences.

So what’s new with moBlog 2.0.3?

  • Bug Fix – There was a bug when you tried to open a saved post which had categories selected. This has now been fixed.
  • Bug Fix – When saved posts were opened, the paragraph breaks were lost. This has now been fixed.
  • Enhancement – An option to delete a saved profile.

Give this new version a spin and let me know what you think.

Happy mobile blogging!

moBlog Progress

moBlog has had about 140 downloads by now. A few people had left comments asking about how to set up moBlog as well as two bug reports.

I have found and fixed one bug that was reported, but the other I have not been able to simulate. Hopefully, I would be able to simulate the issue without inconviniencing the users!

Well this is another posting from moBlog, while in the process of testing the bug fixes!

Posted from moBlog – mobile blogging tool for Windows Mobile has just published a news item about the release of moBlog. You can find it here.

Today seems to be my release day!

Just released a new enhanced version of GMobileSync (1.3.6) which now has Proxy Support as well as a few bug fixes.

One major bug was due to Who.Rel being a required property since of late on GData API. GMS had not implemented this property before but since our last release updating GCal was failing since Who/Rel was made a required parameter. That is now fixed with 1.3.6 so your syncs should work like a charm!

Go ahead and grab yourselves the latest release and be in Sync with your WM Devices and GCAL!

Happy holidays!

It is official! Though it is in beta, moBlog is released. I have created a page for it on this blog.

Those who wanted to give it  a spin, please go ahead and let me know what you think. I would love to hear your feedback and comments. Looking forward to those!

moBlog is almost ready to be released to the public. This initial release will be released as a beta software as so far the only person who tested was me. Once I receive feedback from a few more folks who are willing to give it a spin, and fix any issues if there are any, then I will take the beta tag off it!

So far moBlog works with Blogger, WordPress and Live Spaces. From a technical point of view since moBlog works on both GData API (to support and Metaweblog API (to support WordPress and Live Spaces). And technically moBlog will support any other blogging platform which has support for GData API or Metaweblog API. My intention is for moBlog to support as many blogging platforms as possible. If you there is any specific blogging platform that you need moBlog to support, please let me know and I will try to get it incorporated in a subsequent release.

We’ll this post is made from moBlog client itself. After a few more tests are done, hopefully within a couple of hours moBlog will have its official release!

I have been toying with the idea of creating a blogging application for the Pocket PC / Smartphone devices for sometime. i had done some extensive research on it sometime back, but due to limited time available for coding 4 fun (as I call my experimental coding activities) I had been pushing this idea away. But since I got myself a Windows Mobile phone, this need kept popping up.

My initial reaction was to go back to the applications that I had come across earlier and try them out on the phone. Well the fist one I tried refused to work on my blog unless there was an active Internet connection. This was a major limitation as I did not want to be online while I was writing my post. I know that GPRS/3G usage is charged for the actual traffic, but the downside was an active Internet connection on the phone drained the battery! So that experienced was very shortlived.

Then I did come across several other applications that allowed you to work offline, but I had small issues with them. Some I had issues setting up and running. They had exceptions. Some supported only one blog. I wanted something more as I have a couple of blogs. And I wanted my client application to support all of them without me having to delete and setup when I wanted to switch blogs.

 Also, I still had the urge to develop an application myself. With my involvement in GMobileSync now I was experienced in working with the GData API as well. So I went to work on my Mobile Blogging Application: MoBlogger.

Here are a feature list:

  • Multiple profiles
  • Multiple Blogs within a profile. So if your blogger account has multiple blogs setup, all of them will work!
  • Work Offline – you can work offline and save your posts for uploading later.
  • Supports labels.

Sounds great right? Well yeah… except right now it only supports Blogger! But I am working on supporting multiple blogging platforms! The immediate platforms on the radar are and Windows Live Spaces.

In the mean time if you would like to have a go at it, drop me a mail, I’ll be happy to send you an installation.

I have been busy and it’s not just been my work! I joined an open source project on codeplex. I had this idea to create an application that would sync a Google calendar with a Pocket PC’s Outlook Calendar. Then I was searching around to see whether there were similar applications around and came across GMobileSync which was an open source project on

I requested the project’s coordinator to accept me as a developer and I was accepted. Then I took it upon me to fix a few of the bugs that were reported on the bug list. Then Eric, who is the creator of GMobileSync, told me that if I fixed two way sync, which is the most requested feature I will become the ‘hero’ of the GMobileSync world! That prompted me to put in my free-time towards fixing this issue / feature and last weekend, I managed to fix that. I made a release to codeplex and Eric has since released it to about 500 beta testers. And now I am awaiting for beta test results and keeping my fingers crossed that there wont be any bugs!

Working on an open source project has been pretty exiting. For one Open Source projects will give you the largest audience for your applications. Already the release I did has had 88 downloads for the space of one week. All this time the release was not even public. It was the beta testers who were invited to download and test. Hopefully the number will go up once the release becomes public.

GMobileSync has had about 40,000 downloads. Even if 10% were actively using the application, then that would mean 4000 people. You know it feels good to have an application where there is some little contribution of yours, being used by so many people. The difference in the open source world is that people will be appreciative about your work, unlike in commercial software. In commercial software, since they pay for the software, they tend not to show their appreciation!

If you had been looking for a tool that would sync your Google Calendar with your Windows Mobile device, then give GMobileSync 1.3.5 a try! And feel free to let us know your ideas for improvements or bugs!

Finally, thanks to Eric for accepting me into the project and letting me contribute. And to Lushi for tolerating my coding sessions that went into late in to the night 🙂

I am not a great fan of third party control libraries. I prefer to go for third-party control libraries only if I cannot absolutely do what I want to get done with the standard control. One control library I used recently was the Infragistics Netvantage control suite for .NET 2.0. I have to tell you, it was not a breeze to use. It’s strength is the ability to get the look and feel that is similar to Office 2007. But in terms of programming, there is a learning curve and it is not really straight forward! To its credit, I have to admit that they have a few nifty control, such as the schedule controls which are pretty useful!

Now to my complaint. After working with Netvantage on Windows XP, for sometime, I upgraded my computing platform to Windows Vista. So the first task of setting up the computer was installing all my tools. I managed to install Visual Studio 2005 without a snag, although there were some concerns and complains about Visual Studio on Vista, then I installed the ASP.NET 2.0 AJAX control tool kit which also went ahead without a snag. Then I moved on to install Netvantage, and I HIT a SNAG.

Netvantage installer is a zip file. When I opened the zip on RAR and clicked on the MSI it started the process of extracting. At around 60% of progress the extraction fails saying the compressed file is corrupted. I even tried a fresh download from the Infragistics site, still the same result.

As this same zip file worked for me on my Windows XP computer, I tried extracting the compressed file on the WinXP machine. Voila! It worked, without a snag! I was overjoyed! Seems my problem was solved!

So I moved the extracted files to the Vista machine and then tried the installer. Well, it was progressing pretty well, I thought the installation had completed, and then…. I get this message: “Installation ended prematurely because of an error” What an error message? What the heck!

So I search around and come across this post! So I am posting it again herefor the benefit of those who may face this problem and to thank David Ching for coming up with the solution.

I came across the above error message when I was working with SqlCeResultSets today. I was executing a query and assigning values to a SqlCeResultset to bind the resultset to a combobox. But at runtime, when the resultset was bound to the control, I got the above error.

I could not figure out was causing it. My first take was to assume this was due to the fact that teh resultset was empty. But then that did not make any sense. When I looked into the code, i realized that I have created the resultset as ‘Scrollable’, when I was creating it. Then I changes the resultsetoption to ‘None’. This solved the problem.

I am not sure why Scrollable resultsetoption caused this error in the first place. Any ideas would be most welcome.

I figured it out.

You cannot have a non-scrollable resultset bound to a control. If the resultset is non-scrollable, the ResultSetView property becomes null and hence your data binding does not work.

Actually the issue was somewhere else. I had bound the resultset toa  combobox. And for the combobox, I had a selected index cahgned event handler, which was badly coded without any checks for the value that was selected in the combobox. Once I got that sorted out, the problem was sorted.