Build for Win 7 and Rebuild for Win XP...crash's happen

Apr 6, 2011 at 11:09 PM

Hello everybody!

I've created an VPN Client with the DotRAS resource. My development environment is Win 7, VS2010 and this build is working fine with Win 7 realese of DotRAS. I need to create a rebuild of this application with and to Win XP DotRAS component. I've changed the DotRAS references, re-add DotRAS component for my toolbox and I repleace my RasDialer in main form of VB.Net.


But, when I  try to run this application in WinXP OS, I'm receiving this information (see below please):

 

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: An error occurred creating the form. See Exception.InnerException for details.  The error is: That assembly does not allow partially trusted callers. ---> System.Security.SecurityException: That assembly does not allow partially trusted callers.
   at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
   at VPN_Client_1.main..ctor()
The action that failed was:
LinkDemand
The Zone of the assembly that failed was:
Intranet
   --- End of inner exception stack trace ---
   at VPN_Client_1.My.MyProject.MyForms.Create__Instance__[T](T Instance)
   at VPN_Client_1.Splash.tmr_frm_unload_Tick(Object sender, EventArgs e)
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
HEXEL_VPN_Client
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///Z:/G/Users/Administrator/Documents/Visual%20Studio%202010/Projects/Hexel_VPN_WinXP/WindowsApplication2/WindowsApplication2/bin/Debug/HEXEL_VPN_Client.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
DotRas
    Assembly Version: 1.2.3971.35487
    Win32 Version: 1.2.0.0
    CodeBase: file:///Z:/G/Users/Administrator/Documents/Visual%20Studio%202010/Projects/Hexel_VPN_WinXP/WindowsApplication2/WindowsApplication2/bin/Debug/DotRas.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.




Please... help me... i don't know what i have to do to correct this...

Since now, thanks!
Eduardo

Coordinator
Apr 8, 2011 at 9:25 PM

It seems to me like you're changing references and the application isn't recompiling itself. If you need to use specific features from the WIN7 version of the dll then you're going to have to figure out how you want to compile two versions of your software, however if your application can function with only the WINXP dll referenced it will work on a WIN7 machine just fine. Read the Getting Started -> Choosing your Build page of the help file for more information about cross-platform compatibility.

Apr 13, 2011 at 1:21 PM

Jeff, thank you again for your help.

 

To solve this issue was necessary run the compiled version in a client machine in your local hard drive and not in a mapped shared drive as I was doing.

And I recreate the project (from zero) using the WinXP DotRas dll.

 

Thank you again!!!

Eduardo