How to execute some starting code in a host WCF IIS application?

I am trying to find a hook / way to run some kind of source code to link a bunch of things before calling a service.

any ideas?

+3
source share
2 answers

Well, an easy way would be a static constructor in your service class? Global.asax supposedly works. Another route is to write and register an http module that will be listened to at startup.

+4
source

You can implement IServiceBehavior.

+2
source

Source: https://habr.com/ru/post/1729452/


All Articles