异常时间:2020-05-26 15:09:59,471 [1]
异常级别:ERROR
异 常 类:logerror [(null)]
****************************异常文本**************************** 【出现时间】:2020/5/26 15:09:59 【异常类型】:UnauthorizedAccessException 【异常信息】:对端口“COM1”的访问被拒绝。 【堆栈调用】: 在 System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str) 在 System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace) 在 System.IO.Ports.SerialPort.Open() 在 GCAS.Code.ModbusServerHelper.StartModbusServer() 位置 D:\程序\GCASNet\trunk\Code\ModbusServerHelper.cs:行号 22 在 GCAS.RealTimeForm..ctor() 位置 D:\程序\GCASNet\trunk\RealTime\RealTimeForm.cs:行号 70 在 GCAS.MainForm.MainForm_Load(Object sender, EventArgs e) 位置 D:\程序\GCASNet\trunk\MainForm.cs:行号 41 在 System.EventHandler.Invoke(Object sender, EventArgs e) 在 System.Windows.Forms.Form.OnLoad(EventArgs e) 在 DevExpress.XtraEditors.XtraForm.OnLoad(EventArgs e) 在 System.Windows.Forms.Form.OnCreateControl() 在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) 在 System.Windows.Forms.Control.CreateControl() 在 System.Windows.Forms.Control.WmShowWindow(Message& m) 在 System.Windows.Forms.Control.WndProc(Message& m) 在 System.Windows.Forms.Form.WmShowWindow(Message& m) 在 DevExpress.XtraEditors.XtraForm.WndProc(Message& msg) 在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ***************************************************************