The easiest way is to create an App_Code folder underneath your WCF project root, create a class (I’ll call it Initializer but it doesn’t matter. The important part is the method name) like so:
public class Initializer
{
public static void AppInitialize()
{
// This will get called on startup
}
}
More information about AppInitialize can be found here.