|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
System.Security.SecurityException: System.Security.Permissions.SecurityPermissionCan anyone tell me what means the log below ? I have an application that is intended to control an USB device and when I start taht application this error is thrown... Thanx. V. See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.Security.SecurityException: System.Security.Permissions.SecurityPermission at Test_Microchip_USB.ClassUSBToMicrochip.bMICROCHIP_OpenUSB(String sVidPid, Boolean bForRead, IntPtr& intPtrHandle) at Test_Microchip_USB.ClassStroboscopic.bOpenPipeForWrite(String sVidPid) at Test_Microchip_USB.Form1.GereOpenWritePipe() at Test_Microchip_USB.Form1.Form1_Load(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) The type of the first permission that failed was: System.Security.Permissions.SecurityPermission The Zone of the assembly that failed was: MyComputer ************** Loaded Assemblies ************** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINNT/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll ---------------------------------------- Test Microchip USB Assembly Version: 1.0.2453.18786 Win32 Version: 1.0.2453.18786 CodeBase: file:///S:/Temp%20VDC/test_usb/Test%20Microchip%20USB.exe ---------------------------------------- System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- Microsoft.VisualBasic Assembly Version: 8.0.0.0 Win32 Version: 8.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll ---------------------------------------- ************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled. For example: <configuration> <system.windows.forms jitDebugging="true" /> </configuration> When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box. Does your app run off the USB device?
-- Show quoteCarsten Thomsen Senior .NET Solutions Architect / Developer / Author MCAD/MCSD/MCSE/MCTS "Victor" <vdecam***@hispeed.ch> wrote in message news:1f271$45f966f7$544ae2a1$26694@news.hispeed.ch... > Hi all... > > Can anyone tell me what means the log below ? I have an application that > is intended to control an USB device and when I start taht application > this error is thrown... > > Thanx. > V. > > > > > See the end of this message for details on invoking > just-in-time (JIT) debugging instead of this dialog box. > > ************** Exception Text ************** > System.Security.SecurityException: > System.Security.Permissions.SecurityPermission > at Test_Microchip_USB.ClassUSBToMicrochip.bMICROCHIP_OpenUSB(String > sVidPid, Boolean bForRead, IntPtr& intPtrHandle) > at Test_Microchip_USB.ClassStroboscopic.bOpenPipeForWrite(String > sVidPid) > at Test_Microchip_USB.Form1.GereOpenWritePipe() > at Test_Microchip_USB.Form1.Form1_Load(Object sender, EventArgs e) > at System.Windows.Forms.Form.OnLoad(EventArgs e) > at System.Windows.Forms.Form.OnCreateControl() > at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) > at System.Windows.Forms.Control.CreateControl() > at System.Windows.Forms.Control.WmShowWindow(Message& m) > at System.Windows.Forms.Control.WndProc(Message& m) > at System.Windows.Forms.ScrollableControl.WndProc(Message& m) > at System.Windows.Forms.ContainerControl.WndProc(Message& m) > at System.Windows.Forms.Form.WmShowWindow(Message& m) > at System.Windows.Forms.Form.WndProc(Message& m) > at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& > m) > at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) > at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, > IntPtr wparam, IntPtr lparam) > The type of the first permission that failed was: > System.Security.Permissions.SecurityPermission > The Zone of the assembly that failed was: > MyComputer > > > ************** Loaded Assemblies ************** > mscorlib > Assembly Version: 2.0.0.0 > Win32 Version: 2.0.50727.42 (RTM.050727-4200) > CodeBase: > file:///C:/WINNT/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll > ---------------------------------------- > Test Microchip USB > Assembly Version: 1.0.2453.18786 > Win32 Version: 1.0.2453.18786 > CodeBase: file:///S:/Temp%20VDC/test_usb/Test%20Microchip%20USB.exe > ---------------------------------------- > System.Windows.Forms > Assembly Version: 2.0.0.0 > Win32 Version: 2.0.50727.42 (RTM.050727-4200) > CodeBase: > file:///C:/WINNT/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll > ---------------------------------------- > System > Assembly Version: 2.0.0.0 > Win32 Version: 2.0.50727.42 (RTM.050727-4200) > CodeBase: > file:///C:/WINNT/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll > ---------------------------------------- > System.Drawing > Assembly Version: 2.0.0.0 > Win32 Version: 2.0.50727.42 (RTM.050727-4200) > CodeBase: > file:///C:/WINNT/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll > ---------------------------------------- > Microsoft.VisualBasic > Assembly Version: 8.0.0.0 > Win32 Version: 8.0.50727.42 (RTM.050727-4200) > CodeBase: > file:///C:/WINNT/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll > ---------------------------------------- > > ************** JIT Debugging ************** > To enable just-in-time (JIT) debugging, the .config file for this > application or computer (machine.config) must have the > jitDebugging value set in the system.windows.forms section. > The application must also be compiled with debugging > enabled. > > For example: > > <configuration> > <system.windows.forms jitDebugging="true" /> > </configuration> > > When JIT debugging is enabled, any unhandled exception > will be sent to the JIT debugger registered on the computer > rather than be handled by this dialog box. <ct> a écrit :
> Does your app run off the USB device? The message is thrown as soon as I run the app, as soon as it starts to > use the USB port I suppose... How are you accessing the USB device? Can you display an OpenFileDialog from
within your app and browse to the USB device? -- Show quoteCarsten Thomsen Senior .NET Solutions Architect / Developer / Author MCAD/MCSD/MCSE/MCTS "Victor" <vdecam***@hispeed.ch> wrote in message news:1569b$45fd8daa$50db6117$31505@news.hispeed.ch... > <ct> a écrit : >> Does your app run off the USB device? >> > The message is thrown as soon as I run the app, as soon as it starts to > use the USB port I suppose... <ct> a écrit :
> How are you accessing the USB device? Can you display an OpenFileDialog from Thanks to your last question I found the solution to my problem...> within your app and browse to the USB device? > Hi CT, The app is to be used with a specific USB port (port 0?). In fact, when I disconnect the device or I connect it to an "invalid" USB port, the app says something like "ERROR N° : 901 bMICROCHIP_OpenUSB 0"... So I connected the device to another USB port on my computer, and now... it works... Many thanx !!! and have a nice day ! Victor I'm very pleased to hear it, good luck with th rest. ;-)
-- Show quoteCarsten Thomsen Senior .NET Solutions Architect / Developer / Author MCAD/MCSD/MCSE/MCTS "Victor" <vdecam***@hispeed.ch> wrote in message news:c7829$45fe6116$544ae2a1$32581@news.hispeed.ch... > <ct> a écrit : >> How are you accessing the USB device? Can you display an OpenFileDialog >> from within your app and browse to the USB device? >> > Hi CT, > > Thanks to your last question I found the solution to my problem... > > The app is to be used with a specific USB port (port 0?). In fact, when I > disconnect the device or I connect it to an "invalid" USB port, the app > says something like "ERROR N° : 901 bMICROCHIP_OpenUSB 0"... So I > connected the device to another USB port on my computer, and now... it > works... > > Many thanx !!! > and have a nice day ! > Victor |
|||||||||||||||||||||||