Debugging Azure HTTP 500 Errors

By default, Windows Azure Cloud Services Web Role applications, running in Windows Azure or the compute emulator, have the  HTTP Errors <httpErrors> element of the ApplicationHost.config file set to not display detailed error information. What surprised me is that under the compute emulator, IIS-Express doesn’t use the C:Users<user>DocumentsIISExpressconfigapplicationhost.config file, it uses a an ApplicationHost.config file…

7

DRY-ing out the MVC 2 Templated Helpers

In my MSDN article  Using Templated Helpers to Display Data, I show how they provide a very productive means of building a UI for data sets. The code below shows a typical use of the Display and Label helpers.<span style=”font-weight:bold;”> <%= Html.Label(“Name”) %> :</span> <%= Html.Display(“Name”) %> <br/><span style=”font-weight:bold;”> <%= Html.LabelFor(Pals => Pals.ID)%> :</span> <%=…

0

Using DataAnnotations in MVC 2 – Catching up to Dynamic Data

  DataAnnotations help you write robust validation and prevent the type of annoying error message shown above. Form submittal failure when a field doesn’t validate can be very frustrating –  especially when there is no indication of the problematic property or the constraint violation. I happened to get the Outlook error above when I attempted…

0

Custom Validation Error message not displayed

  A customer pointed out that his Spanish validation error messages were not being displayed; the default Error message was shown instead.  I’ll use the Products table from the NorthWind Db to reproduce the problem and show a work-around. Create a partial class for the Products entity: [MetadataType(typeof(ProductsMD))] public partial class Products { public class…

3

Improving the FK field display: Showing two fields in Foreign Key columns

  The default scaffold of the CustomerAddress table in the AdventureWorksLT database poses a problem: Dynamic Data (DD) defaults to using the first string field in the referenced table. In this case, the first string field is the Title field (Mr,Ms, and so on).  The image below shows the problem with the FilterRepeater drop down…

10

How to create an updateable view with ADO Entity Framework and with LINQ to SQL

Creating an update-able view with  ADO Entity Framework (EF) or LINQ to SQL (L2S) is a fairly advanced topic and not directly associated with Dynamic Data. At the end of the article I have a sample console application to verify the modified L2S data model allows updates on a view. To create an update-able view,…

6

Tweaking the Filter Repeater

The default implementation of Dynamic Data provides a drop down list box for each foreign key and boolean field in a table. The drop down list allows you to filter the table with the value selected from the drop down list box. The figure below shows a view of the Product table from the AdventureWorksLT…

4