Added Error Handler middleware and Configure methods based on compilatio...

...n types

@Tratcher @glennc