Will updating Web.config for WCF service on IIS interrupt current request ?

I've created a simple web service to simulate the above scenario:

(Details omitted):

        [OperationContract]
        int TestCutWebService();


        public int TestCutWebService()
        {
            Thread.Sleep(1000 * 10);
            return 1;
        }

The above code is a web service call that took 10 seconds to handle and return 1.

Testing Client program:


Just a very simple program call will continuously call that 10 sec web service call and print it

The web service return 1 every 10 seconds

Then i update the web service to return 1234 with just overwriting everything in the webservice folder including binaries and webconfig in around 115. The web service is still returning 1 for that service call, then return 1234 seamlessly.


Explain:


When an application restart is required, ASP.NET will serve all pending requests from the existing application domain and the old assemblies before restarting the application domain and loading the new assemblies.


26/2/2019 update:
係application_start度加左要等7秒先start到, 係process途中reload webservice結果如下:


同樣地見到無一個call係被中斷, 反而係最後一個call被處理後, 下一個call黎到先至開始行application_start, 所以個時間就係7+10 = 17秒

留言

這個網誌中的熱門文章

msdeploy include ApplicationPool setting and ignore recycle time

Invoke generic method