I have a WCF project which has several services (e.g. .svc files). The project is hosted in IIS 7.x.
I would like to run some code the first time any user accesses any of the services (because I need to run some code at that time). I can’t seem to find a global.asax kind of construct for this type of project, which would allow me to accomplish this task.
How can I detect the first time any user accesses any of the service?
Since your WCF service is hosted in IIS 7 you could add a Global.asax and use Application_Start.