0

Created simple WCF Service project with some services. How to define project entry logic as Main() in console app, Application_Start() in WPF App.cs or in ASP.NET global.asax.cs?

kmatyaszek
  • 19,016
  • 9
  • 60
  • 65
Arman Hayots
  • 2,459
  • 6
  • 29
  • 53

1 Answers1

0

Put the logic in the static constructor of the Service class. If Service is IService1, put it in

static Service1() {

}

It will be called only once one service start.

iefpw
  • 6,816
  • 15
  • 55
  • 79