June 2011 Entries

Formatting minified jQuery, JavaScript using the Internet Explorer 9 Developer Toolbar
Much has been talked about the F12 developer toolbar in IE and the support it provides for web developers. Starting IE8, the Developer Toolbar is a menu item that helps you view the page source, scripts, profiling and many other details of the rendered page. It even allows script debugging from within and that makes it a truly powerful web developer tool bar. With IE9, the developer toolbar got even better with the Networking Tab that allows you to inspect the traffic/time taken and drill down into ......

Posted On Sunday, June 26, 2011 1:37 PM | Comments (0)

Using the ASP.NET Membership API with SQL Server / SQL Azure: The new “System.Web.Providers” namespace
The Membership API came in .NET 2.0 and was a huge enhancement in building web applications with users, managing roles, permissions etc., The Membership API by default uses SQL Express and until Visual Studio 2008, it was available only through the ASP.NET Configuration manager screen (Website – ASP.NET Configuration) or (Project – ASP.NET Configuration) and for every application, one has to manually visit this place to start using the Security and other settings. Upon doing that the default SQL ......

Posted On Tuesday, June 21, 2011 3:18 PM | Comments (6)

Migrating SQL Server Compact Edition (SQL CE) database to SQL Server using Web Matrix
One of the things that is keeping us busy is the Web Camps we are delivering across 5 cities. If you are a reader of this blog, and also attended one of these web camps, there is a good chance that you have seen me since I was there in all the places, so far. The topics that we cover include Visual Studio 2010 SP1, SQL CE, ASP.NET MVC & HTML5. Whenever I talk about SQL CE, the immediate response is that, people are wow that Microsoft has shipped a FREE compact edition database, which is an embedded ......

Posted On Monday, June 20, 2011 11:32 AM | Comments (6)

Cascading Dropdownlist in ASP.NET MVC 3 using jQuery
MVC 3 is becoming hugely popular thanks to Razor and the Helpers that make building web applications much easier. One of the common requirements in web development, both with web forms as well as MVC based development, is the cascading dropdownlist. Now, for Web Forms, we can use a variety of options viz. server side programming, jQuery or using the AJAX Control Toolkit’s cascading dropdownlist control for accomplishing this. I saw a few samples on the internet that used the erstwhile Microsoft AJAX ......

Posted On Tuesday, June 14, 2011 4:47 PM | Comments (31)

Entity Framework with SQL Azure, "There is already an open DataReader associated with this Command which must be closed first."}
I hit this error when I deployed an app built with Entity Framework onto Windows Azure. Obviously, I wasn’t explicitly using DataReader so it kind of puzzled me. As it happens every time It worked well with local database, application running local and database on SQL Azure. But once I used the Dev Fabric to test the application locally, it failed and gave the above error. Entity Framework relies on using Multiple Active Results Sets (MARS), and it would be a part of connection string multipleactiveresultsets=True. ......

Posted On Tuesday, June 14, 2011 12:51 PM | Comments (0)

Web Role Instances recreated, repaired while deploying MVC 3 Applications on Windows Azure
Recently, I was deploying an MVC 3 Application on Windows Azure. The deployment took longer than expected and the Roles were just restarting/repairing and it couldn’t just start the role instances. Only thing that seemed to have worked was uploading the Packages. Post that, the Roles were simply unable to start and be ready. I deleted the deployment, re-created the package and deployed. Still no avail. It would successfully upload the package but post that the roles would never be able to start. ......

Posted On Tuesday, June 14, 2011 12:16 PM | Comments (1)