开发者

An unhandled exception ('System.Runtime.InteropServices.COMException') occurs while running a C# console application

开发者 https://www.devze.com 2023-04-03 22:42 出处:网络
I wrote a C# console Application to update a Excel Sheet with some values. I wrote this script in my user account. When I debug and run this program it works fine. I used this EXE file (EditExcel.exe)

I wrote a C# console Application to update a Excel Sheet with some values. I wrote this script in my user account. When I debug and run this program it works fine. I used this EXE file (EditExcel.exe) in the Task Scheduler to run at particular time. The Scheduled task works fine. In the task scheduler I changed the process to start when the user is logged in or not and set the User Group as Administrator. At that time the scheduled task was not working as expected. It throws an error, which is as follows:

"An unhandled exception ('System.Runtime.InteropServices.COMException') occured in EditExcel.exe [3712] The Just开发者_如何学Go-In-Time debugger was launched without necessary security permissions. To debug this process, the Just-In-Time debugger must be run as an Administrator. "

I was using Windows Server 2008 machine and I wrote this console application in MS Visual Studio 2008.

How can I overcome this issue?

0

精彩评论

暂无评论...
验证码 换一张
取 消