Debugging HTTP 500 – Internal server error with Windows Azure SDK

Update November 2012 – See my new blog entry Debugging Azure HTTP 500 Errors. This blog no longer applies to Azure. I was working on a lab using the Windows Azure SDK when I got 500 server error Not a descriptive error message. The Windows Azure Tools for Microsoft Visual Studio (WATVS) creates a new…


Using the HTML5 and jQuery UI Popup Calendar with ASP.NET MVC

  Motivated by Rachel Appel’s terrific blog post Create user friendly date fields with ASP.NET MVC EditorTemplates & jQueryUI, I created a full featured article on the topic. You can find my article here.  In addition to the great information Rachel provided, I gleaned good ideas from comments left on Rachel’s blog, such as how…


ASP.NET MVC Dynamic Universal Map of Resources

I’m pleased to introduce the new ASP.NET MVC Content Map. I’m calling this a dynamic map because I work on updating it weekly, and I plan to publish the new map monthly. If you go to the bottom of the page, it shows (as of this blog posting):                                 Last updated August 1, 2011 The…


Should my database calls be Asynchronous Part II

Update 28 November 2012: The combination of await, async, and the Task object makes it much easier for you to write asynchronous code in .NET 4.5.  Now that EF 6 is supporting Async Query and Save, you should take advantage of asynchronous programming. (As of this update, EF6 is not released so don’t use it…


Using CDNs and Expires to Improve Web Site Performance

Much has been written on the advantages of using a  Content Delivery Network (CDN) to deliver static content ( jQuery, images, CSS files, etc.). (If you’re not familiar with CDNs, read ScottGu’s blog post Announcing the Microsoft AJAX CDN  and  Microsoft Ajax Content Delivery Network ) But the biggest advantages of CDNs are often overlooked:…


Securing your ASP.NET MVC 3 Application

Executive Overview You cannot use routing or web.config files to secure your MVC application. The only supported way to secure your MVC application is to apply the [Authorize] attribute to each controller and action method (except for the login/register methods). Making security decisions based on the current area is a Very Bad Thing and will…


Better, Faster, Easier SSL testing for ASP.NET MVC & WebForms

ScottHa has a great blog Working with SSL at Development Time is easier with IISExpress, but I’ve got what I think is a better approach. Please weigh in. In this blog entry I’ll show you how to test SSL on your ASP.NET MVC & WebForms  applications using IIS 7. You should make sure you have…


Test your ASP.NET MVC or WebForms Application on IIS 7 in 30 seconds

A frequent complaint in the ASP.NET forums is that an application works fine with Cassini (AKA, the built in Visual Studio Development Server), but fails when deployed to a real IIS server. The two most common reasons for this failure are: Cassini runs at the root level, so when resources (such as CSS and JavaScript…


Enabling IIS 7.X on Windows 7, Vista SP1, Windows 2008, Windows 2008/R2

To set up IIS to run ASP.NET applications (including MVC 3 and Web Matrix): Install the Microsoft Web Platform Installer 3.0  from here. Run the Web Platform Installer (WPI) and select Products on the top and Server in the left pane.  Click the Add button for IIS 7 Recommended Configuration. Click Install. The image below…


Handling Optimistic Concurrency Exception with EF and MVC 3

I’ve written a simple MVC 3 application to demonstrate handing optimistic concurrency exceptions with Entity Framework (EF). Browsers make it easy to test optimistic concurrency; right click on an edit link and select Open in New Tab, then select the same edit link on the page so you have the same record open for edit…