InvalidOperationException Error

When attempting to run an application that uses one of the SocketTools .NET components, an InvalidOperation exception is generated. If the exception is not handled, a message box will be displayed that contains additional information about the error and then the program terminates.

More Information

This error can occur when you attempt to deploy an application that targets the x64 platform to a 32-bit version of Windows. To ensure your application will run correctly on both 32-bit and 64-bit systems, you can configure your project to target the x86 platform.

If your program was written in Visual Basic, you can specify the target platform following these steps:

1. Open the project in Visual Studio
2. Select Project | Properties from the menu
3. Select the Compile tab
4. Click on the Advanced Compile Options button
5. Select "x86" as the Target CPU

If your program was written in Visual C#, you can specify the target platform following these steps:

1. Open the project in Visual Studio
2. Select Project | Properties from the menu
3. Select the Build tab
4. Select "x86" as the Platform Target

Save the project after you have changed the target platform and recompile the application. It will now run correctly on both 32-bit and 64-bit versions of Windows.

See Also

System.SecurityException Error Using ASP.NET

Shopping Cart
Scroll to Top