VS 2008 - Dreaded Clr20r3 System.InvalidOperationException On Program Start ONLY On Windows XP

Mar 11, 2011

I'm typing this up only to document it and possibly save others the three days of frustration and hell I had to go through. Because this unhanded exception was damned near untrappable (it happens on Form.Show(), but since my primary form was affected, I couldn't tell at the time), it's one I know I lost a lot of hair nailing down.

I have an office application. Standard fare utility program that grew to do lots of custom tricks for my place of business. Lots of database providers to pull data from various unconnected sources and crystal reports to make fancy reports from it all.

When I make a change or addition to it, it usually is only needed by one employee, so I only deploy the new version to one computer at a time. Recently, I had to reinstall the program to the whole company. Everything was going fine, until somebody who had a Windows XP machine tried to run it. It was giving a "clr20r3" "System.InvalidOperationException" on program boot. None of my Try-Catch blocks were catching it. Any Windows XP machine I installed it on was failing, and any Vista/Win7 machine had no issues at all.

I spent the next three days trying to catch what was causing it, pulling out references, reinstalling .NET. Searching for references to this error online was futile since System.InvalidOperationException is one of those ultra-generic errors that pop up for hundreds of oddball reasons.

Finally, by happenstance, I found the cause via a single, obscure post on TechArena by a poster with only that post to his name who decided to chime in with his two cents on someone else's System.InvalidOperationException problem.

About a month ago, I replaced the program icon with a new one. I made up a nice Icon, and compiled pre-sized versions of it into a proper .ICO file from 16x16 all the way up to 256x256. I replaced the program icon with it, the links to the shortcuts in the setup program, and the icon on the main form.

THAT was the bug. Because my .ICO file had sizes larger than 64x64, Windows XP couldn't handle it as a form icon! It works fine for the program icon and for the shortcuts, but the form icons MUST be 64x64 or smaller or the program will throw System.InvalidOperationException on Form.Show(). I didn't know this was the issue since this change was over a month old and I hadn't needed to upgrade a Windows XP machine in that time. Windows Vista and 7 can handle large icon files just fine!

Solution, I made a second, WinXP compliant icon just for the main form. Problem solved. My big icon is still used for my program and shortcuts, so they look great scaling to max size in Windows Vista/7 and XP no longer crashes with a cryptic error message.

View 4 Replies


ADVERTISEMENT

VS 2008 : A First Chance Exception Of Type 'System.InvalidOperationException' Occurred In System.Windows.Forms.dll

Feb 12, 2011

A first chance exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll It displays in my Immediate Window when i run my program, I'm using a text reader to read a number of XML files using background worker...most the time it stops so something is wrong but sometimes it works fine.

View 2 Replies

Clr20r3 System.data Error While Program Loads?

Feb 22, 2011

i have a application windows based created in vb.net that contains crystal reports and access .accdb files. to be honest i have tried to publish this app for 11 times and still there to be some problem. the application will install but it cannot run. it shows an error like this.

Problem signature:
Problem Event Name:CLR20r3
Problem Signature 01:utm point of sale software.exe

[code].....

View 5 Replies

System.invalidoperationexception The Microsoft.jet.oledb.4.0 Provider Is Not Registered Windows 2008 64 Bit Server?

Nov 15, 2011

I am trying to run a vb application on windows server 2008 64 bit. it has an access database and give the error "system.invalidoperationexception the microsoft.jet.oledb.4.0 provider is not registered "

View 2 Replies

Event Type Clr20r3 P3 4a5c12c0 System.net.sockets.socket Exception And Application Crash On Some System While Running Well On Others

Aug 3, 2009

Event type clr20r3 p3 4a5c12c0 system.net.sockets.socket Exception and Application crash on some system. while running well on others. i go thorugh many forms and search a lot on google but not able to resolve the issue.

[Code]...

View 1 Replies

Windows 7 Task Scheduler / System.InvalidOperationException Was Unhandled

Nov 19, 2009

I'm upgrading from Windows XP 32-bit to Windows 7 64-bit, and I'm using VB in VS 2008. Under XP, I used the Task Scheduler to run a program at 3pm every weekday, and it ran fine. Now in W7, when the Task Scheduler runs the programs, it encounters an exception when it gets to the code MyForm.ShowDialog(). The error is:

System.InvalidOperationException was unhandled
Message="Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application."
Source="System.Windows.Forms"

[code].....

When I run the program from a shortcut with the same parameters as in the Task Scheduler (i.e. the shortcut runs the .exe file with some paramters after it), it runs fine, so I'm guessing there is some setting in the Windows 7 Task Scheduler I need to set, but I can't find it. I've tried checking "Run with highest privledges" (and unchecking it), but that didn't help. I have tried it with the "Hidden" box unchecked and checked and that didn't help. I've also tried it with "Configure for" set either way (Windows 7 or Vista). So how do I get rid of this error?

View 6 Replies

Keep Getting A "System InvalidOperationException Occurred In System Windows Forms Dll" Error

Jun 7, 2010

I've just started learning VB.NET with VS 9.0; a small application I'm working on keeps returning an "A first chance exception of type System InvalidOperationException occurred in System Windows Forms dll" error from the Immediate Window. The application has almost zero functionality so far, it consists of a menu strip with:

File About
|Open
|Save
|Save As
|Quit

The only code I have written opens an Open File dialog, a Save As dialog, an About window with background sound and an OK button, and the Quit button which exits.

Since there is almost no code for me to search through, I can't understand why there would be an error. The program runs just fine when I'm debugging it too.

View 1 Replies

VS 2008 - Program Should Start With Windows With Icon Appear At Toolbar

Feb 14, 2010

i want to design a new program that should start with windows and its icon should appear at the toolbar the idea is when i click on the icon a rectangular forum should appear. my question is that: what is the best tool or control should i use? should i use the blank project of windows application or there is special project for that.

View 16 Replies

VS 2008 - Program Using - System.Diagnostics.Process.Start("C:Program FilesFrets On FireFretsOnFire.exe")

Jan 5, 2010

I am trying to launch a program using System.Diagnostics.Process.Start("C:Program FilesFrets on FireFretsOnFire.exe") but the program always fails - the program generates an error log - so its obviously trying to start - ive included the log text but i doubt it will be useful.

Traceback (most recent call last):
File "FretsOnFire.py", line 45, in <module>
File "GameEngine.pyo", line 23, in <module>

Yet it runs fine when double clicked? why i can launch it from explorer but not from my code

View 3 Replies

VS 2008 System.invalidoperationexception Crash?

Apr 8, 2009

the program I am working on works fine on my machine and a coworkers. Today I installed it using click once on another coworkers machine. It works fine on my computer and the first coworkers, but immediately crashes on two other machines. part of the error signature that it wants to send to microsoft is P9: system.invalidoperationexception

I put a msgbox right at the beginning of the initializecomponent() call and it isnt even making it that far.

Users have most up to date .net on their computers.I am stuck big time and quite worried as my company is planning on everyone using this program.

View 1 Replies

VS 2008 System.InvalidOperationException Was Unhandled

Nov 28, 2009

I got the error after I added forms from another project into a new project. Theres no error in my code so it doesn't show where the error occurred.. out and explain what this exception means?

[Code]...

View 1 Replies

VB 2008 Dataset Error : "A First Chance Exception Of Type 'System.InvalidOperationException' Occurred In System.Data.dll"

Sep 27, 2008

I am trying to perform a simple bound connection between an Access database and a text box on a form. This is actually Chapter 18 of the "Microsoft Visual Basic 2008" book.I get the same error message when trying to create my own project "MY ADO Form" or the "ADO Form" project supplied from the DVD provided with the book. I am running the 90 Day Trial Version of Visual Studio 2008 with SP1 and Net 3.5 SP1.

My operating system is the 64 bit Version of Vista with all updates.The error when I try to run the application in the debug mode is:"A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll"and as a result no data shows up in the text box from the database and the data selection bar is grayed out in the form. The underlying database "Students Data Set" appears to be fine as I have seen the correct data for the fields "Instructor" and "PhoneNumber" prior to running the program and when connecting with the database.

View 1 Replies

C# - Thread Start In Form1() Crashing Program On Windows Server 2008

May 12, 2011

I'm getting a really strange error. I have a program that needs to run a thread on startup, and for some reason when I do myThread.Start() in Form1() it will crash with "program is not working" (But only on Windows Server, not on my local machine!). However, if I put the same code under button1_Start() it works no problem. What gives?

EDIT A little extra information: In my thread I have a line of code that uses invoke

Invoke(new Action(() => richTextBox1.AppendText(string.Format("Updating {0}..
", DateTime.Now))));

And for some reason the crashing goes away after I make the thread sleep for 2 seconds before it starts executing. Am I using the right method to execute code on the app startup?

View 2 Replies

Make Program Start At Windows Start Up?

Jun 12, 2010

I have a vb.net application and want it to start at Windows start up only if the user checks checkbox1 the procedures on how to do this and the code

View 1 Replies

Refresh System (Windows XP) Using Program 2008?

Mar 7, 2010

How do I refresh the system (Windows XP) using the Visual Basic 2008.

View 10 Replies

Error: A First Chance Exception Of Type 'System.InvalidOperationException' Occurred In System.Data.dll

May 5, 2011

I am using VS 2008, Office 2007, and Win7 Home Premium on my system.I have a simple application which should be a breeze to build. All I am attempting to do is pull data from an Access database with four small tables into a data grid on a windows project. Should be simple, set up the data connection, choose a datagrid from the table in the data source view, drag it onto the page and done, right?I can't get it to work. It will all work fine until I attempt to run or debug the project. The data will not show up. The data grid does, but I get this error: A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll

As I said, the project seems to build fine, but it will not pull the data. After the initial build I get the message that Windows will show this page in Compatibility View. Is it something with Win7 Home Premium, or a setting somewhere?

View 4 Replies

A First Chance Exception Of Type 'System.InvalidOperationException' Occurred In System.dll

Jun 11, 2009

what does "A first chance exception of type 'System.InvalidOperationException' occurred in System.dll" means? it occur after the bold sentence of my program.

Dim count As Integer = 0
Dim missing As String = "Missing Ingredient:"
For Each strStore In strDownload
If Not strDownload Is Nothing Then

[code]....

View 2 Replies

Error: 'System.InvalidOperationException' (LINQ, System.Core.dll)?

Mar 20, 2012

What in this block of code would throw this exception?

'Get Highest Revision Number
If MyExtract_BTR.RevisionBlocks.Count > 1 Then
Try

[code].....

View 1 Replies

System.InvalidOperationException: The Type System.Object[] May Not Be Used In This Context

Mar 11, 2010

I've got a webservice serialization issue that is causing quite a headache and am hoping to get a little assistance before I end up pulling my hair out or something equally drastic.

[Code]....

View 5 Replies

VS 2010 Can't Start System.Windows.Forms.Timer

Feb 4, 2012

I have a System.Windows.Forms.Timer named "DialogBoxTimer" set up on a form. When the form loads, it has a command to stop the timer. I have a routine [SPDataRecd(...)] that handles SerialPort1.DataReceived from a serial port (modem). When it is activated by a modem event, I want it to start the timer [DialogBoxTimer.Start()], but it doesn't work.If the timer is running, SPDataRecd can *stop* the timer [DialogBoxTimer.Stop()], but it can't start a stopped timer.

View 6 Replies

Cyber Cafe App - Start With Windows (Hidden In System Tray)

Feb 28, 2010

I want to create an application for cyber cafe which I thought should be as follows :-

1. My app starts with windows and is hidden in the system tray.
2. When IE starts my app gives a popup that your time has started at "Whatever the time at the moment would be".
3. When user closes its time is calculated in a Msgbox.

The problem is how to check if the users opens another IE window while working and add the bill to the same user. To reset the timer when i.e., is closed by first user and second user starts operating. How to start the app with windows and that too in system tray.

View 1 Replies

C# - What Happens If Call Start() Two Times On Class System.Windows.Forms.Timer

Dec 28, 2010

Imagine that I have a System.Windows.Forms.Timer with 1000 ms interval. If I call Timer.Start() method and after 500 ms I call again Timer.Start() what happens? The second Start call will reset the interval or not? Are there any side effects?

View 3 Replies

C# - Detect If Application Start Using A Manual Handling (Pressing An Icon) Or Start When Windows Start?

Feb 28, 2011

I have made my application to start automaticly when windows start (registry ../currentversion/run/appname + path). In this mode the application start minimized and an little icon appear in the notification icon area. With this icon you can maximize the app or exit it.If you exit the app and start it again using the Menu (Start/programs etc) than the application start in minimized mode (and in this case I would like to have it in normal mode) because the setting autostart is still true.Is there a way you can detect when the application start when windows startup using the above registry or when people click on an icon in the programs menu (or desktop)?

View 2 Replies

Make A Program Start With Windows?

Aug 24, 2011

vb 2008, How do I get my VB 2008 application to start automatically when a user logs into Windows?

View 6 Replies

Make Program Start With Windows?

Jul 12, 2009

how can i make my program start with windows?

View 3 Replies

Start Program When Windows Starts

Apr 9, 2012

when my program opens at windows xp befor the startup logo, so in sted of seen in the windows screen when you turn on your computer the my program opens and dose not show the windows logo.

View 3 Replies

Start The Program When Windows Starts?

Feb 12, 2012

is there a way I can get my program to run when the user logs on to Windows, but before the Start menu and everything shows up, and then when the program terminates, run Windows normally?

View 17 Replies

System.InvalidOperationException?

Feb 27, 2012

I am getting this error trying to open a project made in vs 2008 in vs 2010 A first chance exception of type 'System.InvalidOperationException' occurred in blah.exe The entire error looks like this

An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

View 6 Replies

Cannot Start A Windows Service Developed In Program

Sep 11, 2009

It works on my own computer where I have visual studio installed. I install the exe file with installutil and the service works fine. But when I install it on another computer where only the framework is present, I still can install it with installutil BUT I can't start it. I get something along this Could not start the Search service on Local computer. Error 1053: The service did not respond to the start or control request in a timely fashion.[code]...

View 2 Replies

.net Splashscreen System.InvalidOperationException

Oct 18, 2011

this is the error I started getting only when I added a splashscreen to my application. Please note that I haven't added any code there - on the contrary - I removed everything from the Splash class. The issue seems not to occur when debugging - I got it from my Virtual machine - what makes the problem a bit more complicated as I have no idea which line may cause it. The problem shows up between splash_screen_dispose and main_show (when I click continue all is ok).

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

************** Exception Text **************
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)

[code]....

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved