Skip to main content

Posts

Showing posts from 2013

HTTP 500.0 - Internal Server Error IIS 7.5

My team and I ran into a strange error during one of our recent project deployments to a staging environment. Our application was designed to run on .NET 4.0 runtime with Internet Information Services 7.5. This was a web services application designed to run WCF services with a basic console application for administration purposes. During the deployment of the console application, we ran into this very strange problem. Any time we visited any page we got the following error message from IIS. HTTP Error 500.0 - Internal Server Error The page cannot be displayed because an internal server error has occurred. Detailed error information had the following: Module ManagedPipelineHandler Notification ExecuteRequestHandler Handler System.Web.Mvc.MvcHandler Error Code 0x00000000 Our application utilized ASP.NET MVC 4.0. We looked at our application log, system event logs and any other log we could find on the server. None of the log files had any information about the error itsel...

Unity Transaction Handler

This post is going to explain how to write a custom Entity Framework Transaction Handler using Microsoft Unity Container. Unity is a light weight dependency injection framework created by the Microsoft Enterprise Best Practices group that also allows optional type and instance interception. You can find all about Unity here . The idea behind a Transaction Handler is to allow application developers to use consistent programming model of transaction management regardless of the underlying technology. As a long time Java programmer, I have seen the benefits of using Spring Framework's transaction management, and I wanted to apply the same programming model and approach to my recent .NET project. Microsoft Unity version 2.0 at the time of this writing did not have an out of the box transaction handler that could easily integrate with Entity Framework unlike its Spring Framework counter part. This post is going to go into detail on how to configure Unity to declare a custom transact...

Contract-First Web Services Development with WCF

I wanted to write this blog post to talk about my recent experience with Windows Communication Foundation (WCF) specifically using Contract-First approach with it. With Contract-First web service development, you first design and develop your web service contract document (WSDL) and then use WCF to implement to contract instead of writing your code first and then generating the contract based on the code. Most of the examples and documentation I have seen on this subject are around creating your code first and then generating your WSDL contract. There are many benefits to using Contract-First approach over Contract-Last approach. To name a few: With Contract-Last, you can't guarantee your contract will stay the same over time since it will get generated every time you make code changes. Contract-First in a way guarantees all involved parties client and server are aware of the SAME contract. With Contract-First, you can easily create reusable schema definition....