Quote Originally Posted by zorro1 View Post
Hi Jenner! First of all thank you for posting your story I was glad when I found this, sadly I'm still having the same error System.InvalidOperationException. In my machine everything is fine of course, but outside my pc the application crashes at start. It doesn't even show the main form. Note the other machine has Windows 7, not XP, and I'm using a virtual machine with win 7 too for the tests I'm doing right now.

First I thought it had to do with the framework 4.0 that I was using, now I'm compiling the app in .net 3.0 for Any CPU, I'm using Windows 7, VS2010 with SQL SMS by the way...

I have an office application too, my program recieves several .xls files to work with that information. I've tried several icons and it doesn't work, I've also tried with the default icon from VS... You are saying it must be 64x64, if I open my original icon in Paint, it says 64x64... In VS it says 32;32 Width 32 Height 32 so I don't know :| Anyway I've replaced my original icon but it doesnt work.

Any other advice/idea?
I've also tried with Try...Catch with the subrutine Form Load, when the main form shows up but it doesnt work... There is also a msgbox in the first line of this sub form load.

Thanks!
And sorry for my english!


zorro1

The Issue has to do with the app.config file

there is a specific line that crashes with only with Windows XP but works fine with W7:

<transport>
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>

You need to remove the entire line (<extendedProtectionPolicy policyEnforcement="Never" />) in order to solve the XP Crash.