My C# application is returning 0xE0434352 to Windows Task Scheduler but it is not crashing

后端 未结 11 1137
悲哀的现实
悲哀的现实 2020-11-27 15:13

I have written a few C# apps that I have running via windows task scheduler. They are running successfully (as I can see from the log files that they are writing ) but windo

相关标签:
11条回答
  • I was getting the same message message within dotNet Core 2.2 using MVC 5, however nothing was being logged to the Windows Event Viewer.

    I found that I had changed the Project sdk from Microsoft.NET.Sdk.Web to Microsoft.NET.Sdk.Razor (seen within the projects.csproj file). I changed this back and it worked fine :)

    0 讨论(0)
  • 2020-11-27 15:36

    In my case it was because I had message boxes. Once I commented that code out, it started working. I remembered that could be a problem when I looked at the event log as suggested in this thread. Thank you everyone!

    0 讨论(0)
  • 2020-11-27 15:38

    I was referencing a mapped drive and I found that the mapped drives are not always available to the user account that is running the scheduled task so I used \\IPADDRESS instead of MAPDRIVELETTER: and I am up and running.

    0 讨论(0)
  • 2020-11-27 15:38

    I had this issue and it was due to the .Net framework version. I had upgraded the build to framework 4.0 but this seemed to affect some comms dlls the application was using. I rolled back to framework 3.5 and it worked fine.

    0 讨论(0)
  • 2020-11-27 15:39

    When setup a job in new windows you have two fields "program/script" and "Start in(Optional)". Put program name in first and program location in second. If you will not do that and your program start not in directory with exe, it will not find files that are located in it.

    0 讨论(0)
  • 2020-11-27 15:43

    In case it helps others, I got this error when the service the task was running at didn't have write permission to the executable location. It was attempting to write a log file there.

    0 讨论(0)
提交回复
热议问题