Ok, just solved the same issue, the server started and stopped straight away if there any errors. Debug you service accurately, you can use attached process or build testing system. I usually use simple text logger:
class TextLogger
{
public static void Log(LogType logType,string className, string message)
{
using (var w = File.AppendText(@"c:\temp\log.csv"))
{
var sb = new StringBuilder();
sb.Append(DateTime.Now);
sb.Append(",");
sb.Append(logType.ToString());
sb.Append(",");
sb.Append(className);
sb.Append(",");
sb.Append(message);
w.WriteLine(sb);
}
}
}
enum LogType
{
Error
Action
}