Using Unity together with a WebApi application and OWIN Hosting is a little bit more complicated compared to the standard WebApi and Unity. This blog shows how to host ASP.NET Web API in a console application, using OWIN to self-host the Web API framework and Unity as an IoC. The following steps need to be […]

This blog demonstrates the usage of filters and unity interface interception with an ASP.NET Web Api application. AOP = Aspect oriented programming. This programming paradigm can be used to add functionality to existing methods. In the following example, we wrap the controller method with diagnosis using filters and then we wrap the business manager with […]

Unity.3.0.1304.1 now supports Windows 8 Apps with the Microsoft.Practices.Unity.NetCore assembly. This is a reduced set of features compared with the full version of Unity. This blog demonstates how this IoC container could be used with a default Windows 8 App. Step 1: Get Unity using nuget: Step 2: Create a UnityHelper class which will be […]

This blog continues on from the previous WiX/installation/deployment blogs. WiX Installer for MVC4 Project WiX installer with PowerShell scripts Creating a silent msi for Semantic Logging OUT-OF-PROCESS service using WiX In all of these blogs, WiX was used to create the setup. This is a free tool which plugs into visual studio. When creating a […]

Sometimes it is required that some properties in a MVC model should not be validated, but the rest are required and should be validated in the client view. Mostly I cannot turn off client validation for all properties in the model. Here is an example of a Model class. I need to validate 2 properties […]

To use the upload html control inside an ajax request, the following steps need to be taken: Define an ajax function for the upload button Define the form for the upload Add the input file control to the form Handle the file in the MVC controller Return the json result, wrapped in a text item […]

This example shows how a MVC4 solution can be setup together with a WiX installation project. To create a msi installer for a MVC4 project, the solution needs to be built, then the web project must be published, the WiX project harvests the published output and creates an msi installer. The solution is configured so […]

WiX is used to create installers. This tool is integrated into visual studio and can be used in any build process or for automatic deployment. No matter how good you software is, if you don’t have a good release/deployment process, you will reduce your client satisfaction and have extra costs for each deployment. This is […]

In a previous blog, the OUT-OF-PROCESS Semantic Logging service was installed from hand. (Power shell script and xml configuration). Enterprise Library 6, Semantic Logging, Part 2, OUT-OF-PROCESS A typical end user cannot be expected to do this. It would be better, if an msi could be created so that a fully pre-configured service can be […]

UPDATED 2014.04.12: latest version of SignalR used and all other packages. The idea of this example is to create a simple SignalR service, so that all Log messages can be sent to a client browser in real time. In the example, EventSource classes are used to send the logs to the ETW. Semantic Logging OUT-OF-PROCESS […]