.NET migration

  • Thread starter Thread starter High and dRy
  • Start date Start date
H

High and dRy

I have the C++ exe created with Microsoft Visual Studio 6.0. Now have
ported the code to Microsoft Visual Studio 7.0. to compile with /clr
extension ON; as the exe uses some managed code components.

The project compiles fine in both Debug and Release version. It also
runs perfectly in both versions if I run the exe directly from windows
explorer.

But when I try to run the Release version from the IDE, it gives me
the following error message:
An unhandled exception of type
'System.Security.Policy.PolicyException' occurred in Unknown Module.
Additional information: Unverifiable assembly
's:\AppSrc\Fe\ToolsSimulator\Release\ToolsSimulator.exe' failed policy
check


If I try to run the Debug version through the IDE the app crashes at:
GetClientRect(rect) at void CRichEditView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags).


Any suggestion will be very helpful.

Thanks,
~Saurabh
 
I am guessing s: is a network share. If so, the default security policy
doesn't allow running non verifiable code from the "Intranet" zone which is
where file shares are in. You will need to specifically allow permissions to
the assembly name, share, the entire intranet zone, a strong name key or an
authenticode certificate.

You will need to debug the crash. The specific line you posted doesn't ring
any immediate bells.

Ronald Laeremans
Visual C++ team
 
Thanks Ronald. That was a good guess !

Ronald Laeremans said:
I am guessing s: is a network share. If so, the default security policy
doesn't allow running non verifiable code from the "Intranet" zone which is
where file shares are in. You will need to specifically allow permissions to
the assembly name, share, the entire intranet zone, a strong name key or an
authenticode certificate.

You will need to debug the crash. The specific line you posted doesn't ring
any immediate bells.

Ronald Laeremans
Visual C++ team
 
Back
Top