Click here to Skip to main content
15,900,705 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
I add a exe in my Task Scheduler of Windows Server 2008. when i runs automatically on the scheduled time it give me the below error

Stopped working
Problem signature:
  Problem Event Name:   CLR20r3
  Problem Signature 01: bulkemailsendingwindowapp.exe
  Problem Signature 02:
  Problem Signature 03: 4e116232
  Problem Signature 04: System.Windows.Forms
  Problem Signature 05:
  Problem Signature 06: 49cc5f77
  Problem Signature 07: 1521
  Problem Signature 08: 137
  Problem Signature 09: System.IO.DirectoryNotFound
  OS Version:   6.0.6002.
  Locale ID:    1033
Read our privacy statement:

And if I trigger the exe by double click it works fine.

Help required.

It clearly doesn't like sending spam...
Share this answer
Mario Majčica 4-Jul-11 6:03am    
That's new W2008 anti-spam feature! Fails by design! :)
hi this error clearly show that it not find the directory where you want to do something.
so create directory forcefully.
and check if is it exist or not.

i hope this will help you.

all the best
Share this answer
Muthu Nadar 6-Jul-11 0:24am    
ya i did all...
I created directory forcefully and i also tried commenting all directory related code, then also it throws the same error.

Anyways.. if an exe run when i double click on it, then it should also work when i attach it on scheduler.

But it fails...
Seems quite clear error System.IO.DirectoryNotFound. How do you manage the paths of files that you are reading/writing inside app?
Share this answer
I got this error while coding a simple solution, and the problem was on the path that I was writing/accessing/reading on the c:\path\to... it wasn't created and it wasn't with the right permissions.

I hope it helps someone.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900