Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a small job (.NET Console Application) scheduled to run daily. The scheduled task runs under a specific user.

When I log in with this user I can run the application without a problem from the command prompt, but when the task is triggered (manually or automatically) it always returns 0xFFFFFFFB as result.

Any suggestions what this error code could mean? (I've searched the web, but very little useful info turns up... It's mostly Linux/Samba related stuff.)

Some extra info: the applications simply reads some data from a SQL Server, dumps it to a local CSV file, pushes this file to a FTP server and deletes the local CSV file.

Cheers, Niels R.

share|improve this question
    
what is in the log file? –  natxo asenjo Nov 2 '10 at 9:30

1 Answer 1

up vote 1 down vote accepted

Ok, I've found the problem.

Seems that the person who wrote the console application didn't specify a path for the temporary CSV file. When you're running from the command prompt this is not a problem as the file will be written in the folder where the executable resides. When running as a scheduled task this isn't true as the application then tries to write the file to the C:\WINDOWS\System32 folder. This results in an "Access to the path 'C:\Windows\system32\SOME_FILE_NAME.csv' is denied." error.

The above plus the lack of a log file is what made this a frustrating ride. Luckily I had access to the source code!

Sorry to bother with this question, but I hope it might help other people in the future.

share|improve this answer
1  
You can specify what folder a scheduled task starts in on Windows so could have fixed this without access to the code too... –  Paul D'Ambra Nov 2 '10 at 11:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.