Thursday, February 24, 2011

Sys.Webforms.PageRequestManagerServerErrorException

I have been for the last 3 days engaged in an almost futile attempt to debug a certain AJAX error was apparently emanating from some Telerik ajax controls. this error is manifested quite randomly

Sys.Webforms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server the status code returned on from the server was: 500

Despite countless hours in asp.net and Telerik Rad Control forums , extensive searches using Google and deep diving in reputed ASP.NET blogs, I could not find a resolution to it. Until one of my colleagues decided to do some excavation work on the event viewer and there it was (among many more):

Exception information:
Exception type: ArgumentOutOfRangeException
Exception message: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at Telerik.Web.UI.GridItemCollection.get_Item(Int32 index)
at ECP.CERS.ControlLibrary.PassGrid.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) in G:\SVN All\cers\ECP.CERS\ECP.CERS.ControlLibrary\PassGrid.cs:line 2794
at ECP.CERS.Website.AppCode.PageController.CERSBasePage.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) in G:\SVN All\cers\ECP.CERS\ECP.CERS.Website\AppCode\PageController\CERSBasePage.cs:line 578
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

To which I breathe a huge sigh of relief and Since then I have rediscovered the use of the eventviewer in debugging code running in production environments. Apparently the message occurs when an asp.net thread dies and it returns the status code 500.

but something is puzzling - Most people seem to have stopped reporting this bug online (it seems to have been quite prevalent circa. 2008-2009) but disappeared - except in my case. strange!!
(FYI: I am using the VS2010 Enterprise, .NET 4.0 Windows 7, latest release of telerik but it was still occurring....strange)

Lesson: Eventviewer is your friend! then Google comes later, the only time Google beats the Eventviewr is when you do search and Google lands you here - coz thats something the eventviewer cannot do :).

Tuesday, February 22, 2011

WP7 uses PC's network connection

Something really cool on WP7 I discovered today - it may already have been public knowledge for others but I really find it so so cool in order to go around an already documented flaw in that WP7 does not connect to WIFI using static IP Addresses.

The thing I just discovered is that when the phone is connected to your PC/Laptop, the apps that require network data access actually use your PC's network connectivity. Which I find really awesome. So you could easily configure your laptop to use WIFI via a static IP address and then connect your phone to it - and bombs away!

Still waiting for the 'updating' update....

Monday, February 21, 2011

Window Phone 7 Update anytime now

Woo! Hoo! - Windows phone 7 updates will begin trickling in as from today, just seen an article elaborating this. the first update should pop-up on your phone anytime now. it is not the copy-paste update but one to aid in the software update process, this is what they put on their website:
"We made some improvements to the way we deliver software updates to ensure that the process keeps working smoothly for you."
OK- its not the NODO update, but in the next 2-3 weeks we should be able to see changes on our phones - this is exciting.

Update
if you are running a samsung focus please read through this first

Friday, February 18, 2011

Yii - The Fast, Secure and Professional PHP Framework

I just the other day picked up a book and started teaching myself how to code apps using Yii and would really recommend it to anyone who wants to pull a rabbit out of a hat really fast, it an MVC framework that employs convention over configuration like ruby on rails and is really fast out of the box.

Tuesday, February 15, 2011

Musings over my continuing journey with WP7


I have been a fan of Microsoft products for a while saying that I have generally been open-minded to what the rest of the platforms have to offer. Last year, I was pondering on the choices of smart phones that were available for offer since my 3 mobile devices were (as if in unison) dying out on me, I heard Microsoft was planning to release Windows Phone 7 - a total reboot from the old Windows Mobile phone OS and naturally this interfered with my plans for an upgrade and as early as 01/01/11 I gave myself a new year gift - a shiny HTC HD7 WP7 device.
I soon downloaded the WP7 SDK, videos, books and started pounding into the framework as i learnt how to harness the power of the device a process that had some revelations:

- I could not run my home brewed apps on my phone since it was not a developer phone.
- I needed to pay $99 to register as a developer and thus register my phone as a dev machine.
- I could not register as a developer even if i wanted to (being based in Kenya and Pakistan)

This was quite frustrating as I had a device i could not use and this was problematic as i would need to stick to the emulator and thus not be able to test GPS, accelerometer, Camera e.t.c. until I discovered ChevronWP7, a jailbreak type application that would unlock my device and thus I got temporary reprieve from my woes. Later I discovered that ChevronWP7 only unlocks the device temporarily as M$ sneaks in and locks it thus rendering all [illegal] apps in the phone useless.

Later in January I got news that apparently the rest of the world was not as enthusiastic as I was on these devices as Microsoft announced that it had sold some 2 million devices in the last quarter of 2010 - a small number compared to the 300k-a-day Android activations over the Holiday season. This led me to my first point of doubt, was I backing the wrong horse? Android on the other hand has a myriad of apps (no one to check for buggy apps, and multiple app installations for the same app - trial and full functional) this was until in Fabulous Febuary: we had all these announcements,
- Nokia announced their collaboration with Microsoft (potential 3X% of the market or more) and the fact that Nokia knows a thing or two about phones seeing as they are the world's leading mobile phone's manufacturing company.
- Microsoft announced the tentative release date of their Window Phone 7 NoDO update i.e. March 8, 2010.
- Microsoft at MWC announced WP7 integration with Kinect, the Mango update, that promises to bring a variety of stuff into the young platform including "multi-tasking", IE9, HTML5 e.t.c. we will however need to wait until April for MIX to shed more light on this.
- There has been a beehive of activity in the WP7 development environment as 66% increase of activity was noted in some fronts when Nokia backed WP7 while the platform had the highest % growth of apps over January 30% compared to other platforms.

Its going to be a make it or break it year for WP7 and this has gotten me excited and I am really looking forward to the future of WP7. Having watched the movie Secretariat sometime ago, I am hoping that WP7 becomes the secretariat in the mobile phone platform as it lunges from behind to beat the fairly old and tested smartphone platforms.
Its a marathon and not a sprint.