I am trying to remote debug a C# application but the debugger is reporting
the following exception:
An unhandled exception of type 'System.IO.FileLoadException' occurred in
Unknown Module.
Additional information: Unverifiable assembly 'FrameGrabber' failed policy
check.
The FrameGrabber assembly is a C++ managed DLL.
I cannot get a stack trace on the exception in the debugger.
I have seen this occur when a C++ managed DLL cannot locate an unmanaged
library
dependency.
The weird thing is that I do not get this exception when I run my
application without the debugger.
I have used the "Depends" tool to check the DLL and found no missing DLLs.
Can someone help me out on what I can
do to locate the cause of this exception?
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc. va***@diebold.com
----------------------------------- 3 6511
Your explanation makes sense, however the twist is that I able to remotely
debug my managed C++ application that uses the same DLL and it does not
produce this exception. What's with that?
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc. va***@diebold.com
-----------------------------------
"Mark Pearce" <ev**@bay.com> wrote in message
news:Od**************@TK2MSFTNGP11.phx.gbl... Hi Ken,
If you're running (and remote debugging) your app from a local network share, then I suspect that you're running into a permissions issue.
Programs that run on the CLR use something called code access security (CAS), which assigns trust based upon evidence it can gather from the code itself. This evidence is then compared against the security policy, and a permission grant is generated.
Part of the evidence used is the security zone where the code is located. When you run the code from your local machine, this will be the MyComputer zone, but when you run it off from a server (or even a server share mapped to a drive on your machine), it will be LocalIntranet. By default, any code that is run from the MyComputer zone will get a
permission set of FullTrust (un-restricted permission to do anything it pleases). However, there is a more restrictive policy placed on LocalIntranet assemblies.
You probably can't get an exception stack trace because it's not your app that's throwing the exception, it's the CLR.
A temporary method of solving this issue is to simply give the
LocalIntranet zone more trust. This can be done in the .NET Framework Configuration control panel applet. A permanent solution is to modify your security
policy to give FullTrust to all assemblies signed with your key.
HTH,
Mark -- Author of "Comprehensive VB .NET Debugging" http://www.apress.com/book/bookDisplay.html?bID=128
"Ken Varn" <va***@diebold.com> wrote in message news:uK**************@TK2MSFTNGP12.phx.gbl... I am trying to remote debug a C# application but the debugger is reporting the following exception:
An unhandled exception of type 'System.IO.FileLoadException' occurred in Unknown Module. Additional information: Unverifiable assembly 'FrameGrabber' failed policy check.
The FrameGrabber assembly is a C++ managed DLL.
I cannot get a stack trace on the exception in the debugger. I have seen this occur when a C++ managed DLL cannot locate an unmanaged library dependency.
The weird thing is that I do not get this exception when I run my application without the debugger.
I have used the "Depends" tool to check the DLL and found no missing DLLs. Can someone help me out on what I can do to locate the cause of this exception?
-- ----------------------------------- Ken Varn Senior Software Engineer Diebold Inc. va***@diebold.com -----------------------------------
Hi Ken,
Sorry, but I know absolutely nothing about managed C++ and how permissions
work in that environment. Are you doing that remote debugging in the same
way, i.e. by launching the remote app from within Visual Studio? Or are you
launching it directly on the remote pc and attaching a debugger, in which
case the permissions issue doesn't apply?
Regards,
Mark
--
Author of "Comprehensive VB .NET Debugging" http://www.apress.com/book/bookDisplay.html?bID=128
"Ken Varn" <va***@diebold.com> wrote in message
news:#E**************@TK2MSFTNGP12.phx.gbl...
Your explanation makes sense, however the twist is that I able to remotely
debug my managed C++ application that uses the same DLL and it does not
produce this exception. What's with that?
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc. va***@diebold.com
-----------------------------------
"Mark Pearce" <ev**@bay.com> wrote in message
news:Od**************@TK2MSFTNGP11.phx.gbl... Hi Ken,
If you're running (and remote debugging) your app from a local network share, then I suspect that you're running into a permissions issue.
Programs that run on the CLR use something called code access security (CAS), which assigns trust based upon evidence it can gather from the code itself. This evidence is then compared against the security policy, and a permission grant is generated.
Part of the evidence used is the security zone where the code is located. When you run the code from your local machine, this will be the MyComputer zone, but when you run it off from a server (or even a server share mapped to a drive on your machine), it will be LocalIntranet. By default, any code that is run from the MyComputer zone will get a
permission set of FullTrust (un-restricted permission to do anything it pleases). However, there is a more restrictive policy placed on LocalIntranet assemblies.
You probably can't get an exception stack trace because it's not your app that's throwing the exception, it's the CLR.
A temporary method of solving this issue is to simply give the
LocalIntranet zone more trust. This can be done in the .NET Framework Configuration control panel applet. A permanent solution is to modify your security
policy to give FullTrust to all assemblies signed with your key.
HTH,
Mark -- Author of "Comprehensive VB .NET Debugging" http://www.apress.com/book/bookDisplay.html?bID=128
"Ken Varn" <va***@diebold.com> wrote in message news:uK**************@TK2MSFTNGP12.phx.gbl... I am trying to remote debug a C# application but the debugger is reporting the following exception:
An unhandled exception of type 'System.IO.FileLoadException' occurred in Unknown Module. Additional information: Unverifiable assembly 'FrameGrabber' failed policy check.
The FrameGrabber assembly is a C++ managed DLL.
I cannot get a stack trace on the exception in the debugger. I have seen this occur when a C++ managed DLL cannot locate an unmanaged library dependency.
The weird thing is that I do not get this exception when I run my application without the debugger.
I have used the "Depends" tool to check the DLL and found no missing DLLs. Can someone help me out on what I can do to locate the cause of this exception?
-- ----------------------------------- Ken Varn Senior Software Engineer Diebold Inc. va***@diebold.com -----------------------------------
I tried to run CASPOL and disabled all .NET security and that seemed to fix
the problem. It seems strange however that the security is so tight for C#,
but not for C++. I have had a whole slew of issues regarding remote
debugging. A lot of other security restrictions are a big pain and I wish
there was an option to bypass all of them with some sort of registry setting
or something.
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc. va***@diebold.com
-----------------------------------
"Mark Pearce" <ev**@bay.com> wrote in message
news:eE****************@TK2MSFTNGP11.phx.gbl... Hi Ken,
Sorry, but I know absolutely nothing about managed C++ and how permissions work in that environment. Are you doing that remote debugging in the same way, i.e. by launching the remote app from within Visual Studio? Or are
you launching it directly on the remote pc and attaching a debugger, in which case the permissions issue doesn't apply?
Regards,
Mark -- Author of "Comprehensive VB .NET Debugging" http://www.apress.com/book/bookDisplay.html?bID=128
"Ken Varn" <va***@diebold.com> wrote in message news:#E**************@TK2MSFTNGP12.phx.gbl... Your explanation makes sense, however the twist is that I able to remotely debug my managed C++ application that uses the same DLL and it does not produce this exception. What's with that? -- ----------------------------------- Ken Varn Senior Software Engineer Diebold Inc. va***@diebold.com ----------------------------------- "Mark Pearce" <ev**@bay.com> wrote in message news:Od**************@TK2MSFTNGP11.phx.gbl... Hi Ken,
If you're running (and remote debugging) your app from a local network share, then I suspect that you're running into a permissions issue. Programs that run on the CLR use something called code access security (CAS),
which assigns trust based upon evidence it can gather from the code itself.
This evidence is then compared against the security policy, and a permission grant is generated.
Part of the evidence used is the security zone where the code is
located. When you run the code from your local machine, this will be the
MyComputer zone, but when you run it off from a server (or even a server share
mapped to a drive on your machine), it will be LocalIntranet. By default, any code that is run from the MyComputer zone will get a permission set of FullTrust (un-restricted permission to do anything it pleases). However, there is a more restrictive policy placed on LocalIntranet assemblies.
You probably can't get an exception stack trace because it's not your
app that's throwing the exception, it's the CLR.
A temporary method of solving this issue is to simply give the LocalIntranet zone more trust. This can be done in the .NET Framework Configuration control panel applet. A permanent solution is to modify your security policy to give FullTrust to all assemblies signed with your key.
HTH,
Mark -- Author of "Comprehensive VB .NET Debugging" http://www.apress.com/book/bookDisplay.html?bID=128
"Ken Varn" <va***@diebold.com> wrote in message news:uK**************@TK2MSFTNGP12.phx.gbl... I am trying to remote debug a C# application but the debugger is
reporting the following exception:
An unhandled exception of type 'System.IO.FileLoadException' occurred in Unknown Module. Additional information: Unverifiable assembly 'FrameGrabber' failed
policy check.
The FrameGrabber assembly is a C++ managed DLL.
I cannot get a stack trace on the exception in the debugger. I have seen this occur when a C++ managed DLL cannot locate an unmanaged library dependency.
The weird thing is that I do not get this exception when I run my application without the debugger.
I have used the "Depends" tool to check the DLL and found no missing
DLLs. Can someone help me out on what I can do to locate the cause of this exception?
-- ----------------------------------- Ken Varn Senior Software Engineer Diebold Inc. va***@diebold.com ----------------------------------- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tom |
last post by:
A question for gui application programmers. . .
I 've got some GUI programs, written in Python/wxPython, and I've got
a help button and a help menu item. Also, I've got a compiled file
made with...
|
by: Sarir Khamsi |
last post by:
Is there a way to get help the way you get it from the Python
interpreter (eg, 'help(dir)' gives help on the 'dir' command) in the
module cmd.Cmd? I know how to add commands and help text to...
|
by: wukexin |
last post by:
Help me, good men. I find mang books that introduce bit "mang header
files",they talk too bit,in fact it is my too fool, I don't learn it, I have
do a test program, but I have no correct doing...
|
by: Colin J. Williams |
last post by:
Python advertises some basic service:
C:\Python24>python
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
With...
|
by: BT Openworld |
last post by:
I have just had to upgrade to Access 2003 as Access 97 EMail (SendObject)
doesn't work when loaded on Windows XP. I'm finding my way around Access
2003 but my biggest problem is getting...
|
by: Corepaul |
last post by:
Missing Help Files
When I enter "recordset" as the keyword and search the Visual Basic Help index,
I get many topics of interest in the resulting list. But there isn't any
information available...
|
by: Steve |
last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp
My expectation is that a developer using my DLL would be able to access this help file during his development time...
|
by: Mark |
last post by:
I have loaded Visual Studio .net on my home computer and my laptop, but my
home computer has an abbreviated help screen not 2% of the help on my laptop.
All the settings look the same on both...
|
by: trunxnirvana007 |
last post by:
'UPGRADE_WARNING: Array has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
'UPGRADE_WARNING: Couldn't resolve...
|
by: hitencontractor |
last post by:
I am working on .NET Version 2003 making an SDI application that calls MS Excel 2003.
I added a menu item called "MyApp Help" in the end of the menu bar to show Help-> About.
The application...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |