0

Calling WebApi immediately after updating the IIS server, returning the error message "A task was canceled". But after the release, wait for a while to call the interface and this problem will never happen. I don't know if it was just released, IIS is not loaded yet? What does IIS work like after updating files?

The project target framework is .NET framework 4.5.

Chi
  • 1
  • IIS recycles the application pool and reloads your updated dlls and caches some items before the app gets ready. It may be quick or take a while, depends on your application and required resources. More details [Here](https://stackoverflow.com/a/9658924/2174170) – Dumisani Oct 17 '19 at 09:07
  • How did you update your IIS server? You mean update your IIS release version or install windows update. What error message did you see in event viewer application log? – Jokies Ding Oct 18 '19 at 09:44
  • Thanks for you help, this is what I want to know. My English is not good and I am newer to stackoverflow, I am sorry for the trouble with you. I mean upgrading my project to the IIS server. – Chi Oct 22 '19 at 08:42

1 Answers1

0

Based on my understanding, When you update your project for your IIS website, Application pool will be recycled and your application need some time to pre-complied Again.

When you access the web service during the pre-compile process. Your application pool pipeline would probably cancel the task. That's why you will no longer receive this error after a while. As long as you don't receive "task canceled" error any more, you don't have to worry about that.

Jokies Ding
  • 3,374
  • 1
  • 5
  • 10