I have a wcf service which hosted at IIS
<%@ ServiceHost Language="C#" Debug="true" Service="MyService" Factory="InitializableServiceHostFactory" %>
my problem is that the CreateServiceHost is called with each request to MyService method, which make my initialization code which is written in CreateServiceHost is called multiply.
After I checked a lot about this problem, I saw that it is related to ASP.NET dynamic compile, it is recompile the whole site when any things inside Bin folder is changed, but my WCF service writes to the temp folder inside Bin folder which make the site recompiled then the Application_Start re-fired, then the InitializableServiceHostFactory re-create the WCF service
I know it is a dummy problem :(
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With