Debugging Custom Scheduled Tasks

Stefan Sturm asked on April 15, 2020 09:47

Hello,

I lost the ability to debug custom scheduled task on localhost. It looks like the Kentico instance isn't using the local dll from the bin folder.

Any suggestions

kind regards stefan

Correct Answer

Zach Perry answered on April 15, 2020 16:08

In addition to what Brenden said, if you don't have the task enabled, when you manually run it, it should run on your localhost instead of the server.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Dmitry Bastron answered on April 15, 2020 10:01

Hi Stefan,

Have you done any changes recently that could have affected this? Have you tried to clean and fully rebuild the local website? Or even re-download the code from the code repository and make a fresh build? I've noticed a couple of times that build is not updating the task dll in bin folder and hence you can't attach from VS properly.

2 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on April 15, 2020 14:42

If you're connecting to a shared development database the problem is the other "server" is processing the tasks. So what you need to do is stop that other shared website and allow the tasks to be executed on the "current" server which would be locslhost.

3 votesVote for this answer Mark as a Correct answer

Stefan Sturm answered on April 16, 2020 12:12 (last edited on April 16, 2020 12:12)

Thanks for your help!

I got it working with a combination of Brenden and Zachs answer.

  • I stoped the shared website (IIS and Apppool)(no debugging)
  • I entered "localhost" as the task-server (no debugging)
  • I cleard application cache and restarted the instance (localhost) (no debugging)
  • I disabled the task (localhost) - finally I was able to debug

thanks alot. Stefan

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.