It looks like the recent Microsoft updates broke ASP.NET / IIS on my development machine. Trying to launch any website hosted on my local IIS server returned a 500 error and the following error message: Calling LoadLibraryEx on ISAPI filter “C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_filter.dll” failed; And checking the event log just returned a similar error message: ISAPI Filter ‘c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_filter.dll’ could not be loaded due to a configuration problem. The current configuration only supports loading images built for a . . .
I’ve just spent a good couple of hours trying to debug what appeared to be a corrupt session in NHibernate. The unit tests would work, isolating the NHibernate code causing the problem worked, but within the application when calling Session.Save() the code always complained about a corrupt session. Finally, after much investigation and head-scratching, the problem was traced to an earlier call to AutoMapper. This code was mapping an ID in the source to a . . .
The code below defines an object that holds an instance of the Castle Windsor container and sets it up to handle all requests to resolve ASP.NET MVC Controllers. It also includes code to inject instances of HttpRequest and HttpContextBase. This means that you can define injected objects that contain references to HttpContextBase in their constructors (which can be your MVC controllers) and they will receive populated instances of these objects. It is worth noting that . . .
As I’ve previously mentioned anyone starting out with IoC and ASP.NET MVC quickly encounters problems injecting HttpContext and related classes into controllers, etc. A similar issue surrounds Action Filter Attributes but is not limited to just HttpContext as objects inheriting from ActionFilterAttribute must contain a “parameterless” default constructor. Without a “parameterless” constructor these objects can not be created when used to decorate a class or action declaration. Also, the MVC engine is responsible for the . . .
Having recently taken a look at NServiceBus, the first obstacle that I encountered was that it was not compatible with the version of Castle Windsor which we were using. Luckily due to the design of NServiceBus adding a new version of an IoC framework is relatively painless if you follow a couple of basic steps and follow the format laid out by the existing framework. Whilst the NServiceBus documentation say what you need to do, . . .
In my current role, we have come across a requirement to map message objects to more complex domain entities. As anyone that has done this previously will quickly tell you, manually writing code to do this is very boring and repetitive. With very limited time and resources, that effort could be better spent elsewhere on the project. As it seemed very simple to set up and start using we’ve decided to use AutoMapper. Configuring / . . .
Whilst working on a proof of concept WCF service I ran into an interesting security “zone” issue which caused me a few headaches for an afternoon. I was moving some code out of a prototype WinForm application into a WCF service to prove and demonstrate the next phase of the infrastructure. The functionality in question reference some custom ‘C’ libraries which had already been proven to run when referenced locally within the Windows application. However . . .
I guess the obvious answer is “yes” as there is always notepad and command line compilation, but if you want to use Visual Studio or do anything with IIS, Message Queues, etc. then the answer quickly becomes a frustrating no! This hasn’t usually been a problem, but having just started in a new job which is just starting out in .NET I’m finding what a frustrating experience not having admin rights can be. Visual Studio . . .