Hello,
There is an application that I recently converted to use .NET framework 4.0 (using the wizard in visual studios 2010) and it runs fine on my local PC (Windows XP SP3).
However, this same application when deployed on the server does not work and generates the following two errors in the Event Viewer.
--------------------------
----------
----------
----------
----------
----------
----------
----------
----------
------
Error 1:
EventType clr20r3, P1 tc2sa_interface.exe, P2 1.0.0.0, P3 4e8b2197, P4 tc2sa_interface, P5 1.0.0.0, P6 4e8b2197, P7 137, P8 e3, P9 system.invalidoperationexc
eption, P10 NIL.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Error 2:
Application: TC2SA_Interface.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationExc
eption
Stack:
at Microsoft.VisualBasic.Appl
icationSer
vices.Wind
owsFormsAp
plicationB
ase.DoAppl
icationMod
el()
at Microsoft.VisualBasic.Appl
icationSer
vices.Wind
owsFormsAp
plicationB
ase.Run(Sy
stem.Strin
g[])
at TC2SA_Interface.My.MyAppli
cation.Mai
n(System.S
tring[])
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
--------------------------
----------
----------
----------
----------
----------
----------
----------
----------
------
What I did for the time being was to reopen the backup that the conversion wizard does, and add my changes into that code (exact same changes), and recompile with Visual Studios 2008 and deploy, and then it works again on the server.
I tried another application coded entirely in Visual Studios 2010 (targeting .NET framework 4) and it opens fine on the server, so i'm not sure what else it could be? I read about putting the
<startup useLegacyV2RuntimeActivati
onPolicy="
true">
<supportedRuntime version="v2.0"/>
<supportedRuntime version="v4.0"/>
</startup>
tags in the configuration file, but that didn't really help (although it provided me with the errors above, before it would just be the 1st error with .NET 2.0 listed as framework)
I'd really like to ensure that projects converted from older .NET frameworks are able to run on this server so that we can keep our applications up to date, but i'm at a loss as to why it won't run on the server, but will work fine on my PC.
(I can't really provide code, as it is happening before the application even opens, so it's not even making it to the form_load where the written code begins)
Thank you for any help.