When an alert occurs, the service creates a process and runs the specified command file. The service also copies any command-line arguments you define to the command line that is used to run the file. Click Command Line Arguments, and then click to select the appropriate check boxes to include the arguments that you want when the program is run.
Note You must select at least one command-line argument or the program will not run. (This is true regardless of what program you have selected.)
Do you have some kind if exception handling/logging in your C# app? Do you get anything from it?
Could you put your C# app call in a batch file and start that from the alert? If you add something like
echo %date% %time% > log.txt
at the start of your batch file you could see if it started at all.
Did you set the Run As field in the alert properties? If not, your program is being run as a LocalService, which does not have network access (among other things).
Try setting it to a user account under which you were able to verify that your program works correctly.
发布评论
评论(2)
难道你的程序没有命令行参数吗?
我在 http://support.microsoft.com/kb/324752/en 上找到了以下内容-我们
您的 C# 应用程序中是否有某种异常处理/日志记录? 你从中得到什么吗?
您能否将 C# 应用程序调用放入批处理文件中并从警报中启动? 如果您
在批处理文件的开头添加类似的内容,您可以看到它是否已启动。
Could it be that you have no command line arguments for your program?
I found the following on http://support.microsoft.com/kb/324752/en-us
Do you have some kind if exception handling/logging in your C# app? Do you get anything from it?
Could you put your C# app call in a batch file and start that from the alert? If you add something like
at the start of your batch file you could see if it started at all.
您是否在警报属性中设置了运行方式字段? 如果没有,您的程序将作为 LocalService 运行,它没有网络访问权限(除其他外)。
尝试将其设置为您能够验证程序是否正常运行的用户帐户。
Did you set the Run As field in the alert properties? If not, your program is being run as a LocalService, which does not have network access (among other things).
Try setting it to a user account under which you were able to verify that your program works correctly.