Blog Pages

Friday, May 27, 2011

If you install Azure SDK 1.4 and then your web roles say System.TypeLoadException for System.ServiceModel.Activation.HttpModule in ASP.NET 4

If you install Azure SDK 1.4 and then your web roles say System.TypeLoadException for System.ServiceModel.Activation.HttpModule in ASP.NET 4, then follow this advice

http://blogs.iis.net/webtopics/archive/2010/04/28/system-typeloadexception-for-system-servicemodel-activation-httpmodule-in-asp-net-4.aspx

and run:

aspnet_regiis -iru

in a "run as admin" command prompt

Thursday, May 26, 2011

The ViewData item that has the key 'XXX' is of type 'System.Int32' but must be of type 'IEnumerable'.

If you're using ASP.Net MVC and you get this message using a DropDownList...

... then check whether the IEnumerable you think you are passing in actually exists in your ViewBag/ViewData

Saturday, May 21, 2011

A value shared across entities or associations is generated in more than one location.

If you're using EntityFramework and you see this error - 

A value shared across entities or associations is generated in more than one location.


Then what it means is: you've set up inheritance using multiple tables and you've left the key autogenerated in one of the derived types.