Get the executing assembly of a web app referencing a class library

05 Sep 2013 .Net, C#, MVC No Comments

I needed to check that any web app that was referencing my class library was giving me a valid controller and action name in some settings in its web.config, so that when I used them in a redirection there would be no errors because they did not exist. When I used to

Continue reading →

Using Custom Action Filters in Class Libraries

21 Aug 2013 .Net, C#, Filters, MVC 2 Comments

I have recently been creating a class library that many MVC web applications are going to reference, and I wanted those applications to be able to implement some custom Action Filters so they did not need to duplicate code. I had originally thought this was not possible, due to the

Continue reading →

Config Transform Files for changing Web.config for release (ASP.Net 4.0)

26 Jun 2013 .Net, Visual Studio No Comments

You can change parts of the web.config between different builds (e.g. debug and release). I used it to change whether cookies must only be sent and received over ssl. It is also useful for changing connection strings from debug to live versions and also user defined keys (examples below). Clicking the arrow

Continue reading →