WCF Service Proxies – Channel Factories
Some time ago I got a bit fed up with the standard way that Visual Studio creates WCF client proxies. I.e. right click and add service reference. Although it is fairly simple to create service clients this way, it generates a load of horrible code within you project. It also has the following short comings: [...]
Read MoreFluent NHibernate References – Left Join (Sort of)
I hit an issue yesterday with NHibernate which I managed to resolve so I thought I’d jot down some notes. The problem was as follows: We have a class called Person see below: public class Person { public virtual int Id { get; set; } public virtual Car Car { get; set; } } Using [...]
Read MoreScript Tags in Asp.Net MVC
Just a quick tip really, when adding Javascript tags to you Asp.Net MVC master page use the following syntax rather than hard coding the path: <script src="<%= Url.Content("~/Script/jquery-1.2.3.min.js") %>" type="text/javascript"></script> This allows the Asp.Net engine to resolve the path and is more reliable than hard coding it. Thanks to Steve Fenton for this gem.
Read MoreWindsor IOC – Notes and Code Samples
I have been messing around with Windsor recently and I thought I would jot down some notes. I have also add some code samples to demonstrate various aspects of Windsor. See code samples at the bottom of the post. Dependency Injection / IOC Before going any further make sure you understand the concepts of IOC [...]
Read MoreASP.Net Sessions with SQL Server
I recently ran into some problems with ASP.Net session state with a SQL server provider. At times the SQL Database is being hit extremely hard with updates locks and reset timeout events. Consequently I have spent a fair amount of time researching the optimisation of session state and I thought I’d write up some of [...]
Read MoreWCF – Multiple Endpoints in IIS
Background Sometimes it is desirable to configure a WCF service to support on more than one endpoint. Implementing this on a service which is hosted outside IIS (in a console app or Windows service say) is very straight forward and logical. Surprisingly achieving this on a service which is hosted in IIS is just as [...]
Read MoreNMock – Custom List Matcher
I am a big believer in Test Driven development. I am also an avid user of mocking Frameworks I having used the excellent Rhino Mocks framework in the past and am currently using the NMock framework as this is the preference of my current client. Anyway, the other day I was testing some code was [...]
Read More