次の方法で共有


Got an error today: EventType clr20r3, P1...

Today after I compiled my winform program in Windows XP with .NET Framework 2.0, I copied the assembly to another Windows 2003 ENT Server. When I run this program in W2k3 server, nothing responded, and following message is created in Application Events.

EventType clr20r3, P1 steprecorder.exe, P2 1.0.302.0, P3 440bee00, P4 steprecorder, P5 1.0.302.0, P6 440bee00, P7 39, P8 f, P9 system.missingmethodexception, P10 NIL.

So hard-reading log message :-( what could I get from it?

I searched from Internet but got nothing useful. Seems "clr20r3..." type event could be triggerred by many reasons.

But I found that the further issue is that if a machine with VS2005 installed (whether winxp or w2k3), the program could run properly, or it will fail. It is so strange, is it a VS2005 bug?

At last I found the clause cause this issue. When I drag and drop a list view control in a form, VS2005 will auto generate the related clauses, one of them caused this failure.

            //
// testcaseListView
//
this.testcaseListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.numberColumnHeader,
this.titleColumnHeader,
this.testpathColumnHeader,
this.bitmapColumnHeader,
this.dirtyColumnHeader,
this.psCaseIDColumnHeader,
this.lastModifiedHeader});
this.testcaseListView.ContextMenuStrip = this.listViewContextMenuStrip;
this.testcaseListView.Dock = System.Windows.Forms.DockStyle.Left;
this.testcaseListView.FullRowSelect = true;
this.testcaseListView.GridLines = true;
this.testcaseListView.Location = new System.Drawing.Point(0, 0);
this.testcaseListView.Name = "testcaseListView";
this.testcaseListView.Size = new System.Drawing.Size(509, 162);
this.testcaseListView.TabIndex = 0;
//this.testcaseListView.UseCompatibleStateImageBehavior = false;
this.testcaseListView.View = System.Windows.Forms.View.Details;

There is nothing in MSDN to explain this property, but say it is new in .NET 2.0.

After I comment the red one, the application program could run on other winxp/win2k3 machine successfully.

Comments

  • Anonymous
    March 22, 2006
    I also just saw that one. I think UseCompatibleStateImageBehavior was added between revision 7 and 42(RTM), so maybe you have a late RC of the .NET Framework installed?

  • Anonymous
    March 24, 2006
    Really? My VS2005 version is just 8.0.50727.42(RTM.050727-4200), vsts sku.

  • Anonymous
    March 31, 2006
    Please see my post on MSFT

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=328111&SiteID=1&mode=1

  • Anonymous
    April 02, 2006
    Thanks Chris for your solution :-D

  • Anonymous
    April 10, 2006
    suggest

  • Anonymous
    July 18, 2006
    Thanks so much for this, I was pulling what little hair I have left out trying to fix this one.

  • Anonymous
    October 06, 2006
    I'm also getting this error, but I have no instances of "UseCompatibleStateImageBehavior" in my projects. Are there any other known causes?

  • Anonymous
    October 09, 2006
    Hello Just fixed a similar problem. I had 3 unmanaged dll's, 2 of them compiled with no support for ATL and one with. Because of the one with support for atl, my service won't start. Recompiled the funcky dll without suport for atl and everithing works now. Maybe this helps.

  • Anonymous
    October 16, 2006
    The comment has been removed

  • Anonymous
    October 16, 2006
    Seems there are several reasons cause this issue. If it is possible, you could narrow down the suspected code block to investigate which statement make the error happen. When I got this issue, I had no idea from the error message but commented off the suspected code to narrow down the issue.

  • Anonymous
    November 27, 2006
    i too got the same error. i dont have any VS2005 or as a matter of fact not a single version VS installed on my machine. why am i getting this error and how to proceed to resolve this issue? iam trying to remove Exchange 2007 from Add/Remove programs and i found this error msg in event logs. please help me out.

  • Anonymous
    November 27, 2006
    i too got the same error. i dont have any VS2005 or as a matter of fact not a single version VS installed on my machine. why am i getting this error and how to proceed to resolve this issue? iam trying to remove Exchange 2007 from Add/Remove programs and i found this error msg in event logs. please help me out.

  • Anonymous
    November 28, 2006
    This error may come from many reasons, what I post is only one of them. If you don't have other methods, maybe you could comment some doubtable functions, to see if this error occurs. If this error disappears, you could continue to narrow down to the reason. This is not a smart way, but it may be useful:-D Elton

  • Anonymous
    January 17, 2007
    I saw this error in the eventviewer. In my situation it only was due to the structure of the app.exe.config which was not XML-valid (manual copy/paste). The error dis-appeared after correcting the config file

  • Anonymous
    February 19, 2007
    The comment has been removed

  • Anonymous
    February 28, 2007
    The comment has been removed

  • Anonymous
    March 12, 2007
    I get the same error but totally random.  I have a .Net app running from the scheduled task.  It always works when ran manually.  Fails about 50% of the time when scheduled.  If you watch it fail when scheduled then go and run it, it works.  Clueless.

  • Anonymous
    March 13, 2007
    "I get the same error but totally random.  I have a .Net app running from the scheduled task.  It always works when ran manually.  Fails about 50% of the time when scheduled.  If you watch it fail when scheduled then go and run it, it works.  Clueless." That sounds like a permissions issue that corrects itself when run interactively - or when a user is logged into the machine.

  • Anonymous
    March 15, 2007
    I found that my GUI application indirectly references an "SMDiagnostics.dll" which is a COM dll (shipped with .net 3.0). I copied that file to the user's machine and registered. Afterwards, my app started working properly.

  • Anonymous
    March 29, 2007
    The comment has been removed

  • Anonymous
    March 29, 2007
    I have just fixed such an error up with my Windows Service that I needed to install on MS Windows Server 2003 STD. The server had .Net Framework 2.0 showing in Add?Remove Programs. I realize it came as part of SQL Express. This is not enough to run custom .Net based applications. So after I added the regular .Net Framework 2.0 redistributable as part of my install package all worked. (In MS VS 2005 use Prerequisites from install proj properties to have the .Net 2 downloaded from the same location for instance). Regards, Arthur

  • Anonymous
    April 22, 2007
    I got the same error but in my case my .NET installer "setup.exe" did not register DLL's referrenced in my code.

  • Anonymous
    April 26, 2007
    I am getting a similar error but the circumstances are significantly different. I have an option to pass the query string parameters to the program. Whenever I invoke the application without the query string parameters, everything works perfectly. Every time I pass a query string parameter, it blows up on me and gives an InvalidCastException. I have no idea why this happens. I tried everything. Any ideas?

  • Anonymous
    May 02, 2007
    I got this error. and in my application i found that it is due to using multithreaded apartment (MTA)and when application runs on hyper threaded machine.

  • Anonymous
    May 08, 2007
    The comment has been removed

  • Anonymous
    May 09, 2007
    I get the same error in a windows service. It seems like this is some catch all error id, and can have many underlying causes. THE REAL ISSUE IS: I have exception handling code in my service, that ought to catch all exceptions and leave the service running. This problem is not caught and the service stops. This happens maybe once a day on a remote server and not in development, so it is not easy to debug.

  • Anonymous
    May 10, 2007
    The comment has been removed

  • Anonymous
    May 15, 2007
    I get this error clr20r3 and the windows service was stopping. Since it is hard to debug, I just noticed that there is a recovery tab when we select the service properties. I set the recovery steps on first failure, second failure and subsequest failures to restart the sevice after 1 minute. Hoepfully it should take care of the issue for now untill i debug this.

  • Anonymous
    May 18, 2007
    I got the same error in a Console Application using C#. Just opened a new VS, copied the code into it (did not re-use the old files). Voila! The error is gone.

  • Anonymous
    May 20, 2007
    The comment has been removed

  • Anonymous
    May 20, 2007
    looking at my .csproj file I notice reference include section was pointing to .net v1.1 DLL's. I manually changed it to point to .net 2.0 DLL's and changed "this.lvOrderItems.UseCompatibleStateImageBehavior = true" back to false and no crashes. So it seems sharpdevelop was compiling to .net 1.1 instead of 2 even tho I have 2.0 selected in project options. I only have .net 2.0 installed on the test machine, while the develoopment machine has both 1.1 and 2.0. My SharpDevelop installation must be messedup.

  • Anonymous
    July 01, 2007
    i got this error,can u help me??? EventType : clr20r3     P1 : desktop.exe     P2 : 1.0.0.0     P3 : 4687c6a0 P4 : system.data     P5 : 2.0.0.0     P6 : 4333aea2     P7 : 25c3     P8 : 29 P9 : system.data.sqlclient.sql

  • Anonymous
    September 16, 2007
    please help me and tell what can i do?

  • Anonymous
    September 17, 2007
    The comment has been removed

  • Anonymous
    September 17, 2007
    The comment has been removed

  • Anonymous
    September 17, 2007
    mostafa, seems you have the same issue with me. In my case, it is the property "UseCompatibleStateImageBehavior" of ListView causes the issue, you may try to find if you have this property used in your code. If it doesn't work, you may comment some doubtful codes to find which statement causes the issue.

  • Anonymous
    September 25, 2007
    This error can occur for a number of reasons, but the most important fact is that it is an unhandled exception. Make sure you have global (catch all) exception handlers as the exception may not be on the main application thread. There are a number of ways to do this but the simplist is to wrap the Application.Run in a try catch block: [STAThread] static void Main(string[] args) { #if DEBUG            Application.Run(new Form1()); #else            try            {                Application.Run(new Form1()););            }            catch (Exception ex)            {                //write error to log            } #endif } Another way is to use the ThreadException event: Application.ThreadException += new ThreadExceptionEventHandler(                Application_ThreadException);

  • Anonymous
    September 25, 2007
    Sorry correction to the code above: [STAThread] static void Main(string[] args) { #if DEBUG            Application.Run(new Form1()); #else            try            {                Application.Run(new Form1());            }            catch (Exception ex)            {                //write error to log            } #endif }

  • Anonymous
    October 23, 2007
    For me the problem solved itself when i reinstalled .net 2.0! Thanks for all the comment, they where very helpfull.

  • Anonymous
    October 29, 2007
    I was getting the same error.  the exe would work on some boxes but would get this error on others.  my problem was the vb6 ocx that my .net exe was using was missing some dlls.  So once I copied those dlls into system32 and registered them my exe worked great.

  • Anonymous
    December 26, 2007
    I am getting this error in IIS while using the Webservice using .Net 2.0. This Web service was working fine in ver 1.1. can anybody help. Thanks in advance

  • Anonymous
    January 15, 2008
    Check this website -> it may help you. http://www.blackteaconsulting.com/journal/?p=116

  • Anonymous
    January 28, 2008
    The comment has been removed

  • Anonymous
    February 05, 2008
    The comment has been removed

  • Anonymous
    February 09, 2008
    This error happened to me also. My case is different. The win forms application uses Matlab. It runs well with admin previlage. But for user role it is giving the same error.

  • Anonymous
    March 21, 2008
    I am having similar problems where Admin users can run the app just fine but regular users can not,  my app is .net 1.1 win-app moved to Windows server 2008 Enterprise. It is a security issue that I can not relove. any help please.

  • Anonymous
    March 25, 2008
    I got the same issue ..the same service is working fine on win xp....but after shifting the application to win 2k3 it is showing the same issue.............any one 've any concrete solution to the above issue ?

  • Anonymous
    March 26, 2008
    Hi Everyone, After quite an effort we were able to fix clr20r3 error we were getting with our C# project distribution. We were using a .ocx file which if not registered on target machines will give us that error. In C# setup project, simply go into the properties of respective .ocx/.dll and select ....COM under Register, rebuild and you should be OK with your distribution.

  • Anonymous
    April 01, 2008
    I fixed my issue by changing the security access of the program. Good luck to everyone.

  • Anonymous
    April 07, 2008
    The comment has been removed

  • Anonymous
    May 11, 2008
    The comment has been removed

  • Anonymous
    May 11, 2008
    please help me and tell what can i do? Server OS is Windows server 2003 standard edition. I am using one COM dll and one OCX.

  • Anonymous
    May 11, 2008
    The comment has been removed

  • Anonymous
    May 14, 2008
    The comment has been removed

  • Anonymous
    June 11, 2008
    Just ran into the same error. After reading this blog and some links I thought it would be a good Idea to recreate the whole project. (glad it's a small one :) ) Cecking the code one more last time I discovered that the Dependency to the dot net framework was missing. Hoping this would solve the probel I recreated the setup project. Unfortunately it did not solve the problem. I now have to wrap the code in try catch structures to get a better error One thing I want to add after reading all the posts is that independend on what dot net yuo develop on (I work now with VS2008 using 3.5) this error must be caused by a call to a dll from the 2.x framework. the frameworks do NOT replace each other but add functionality. So even building in 3.5 will make you use 2.0 if the fucntionality belongs to 2.0

  • Anonymous
    July 03, 2008
    I had this sort of error today (system.servicemodel in P4) and it was because my user's permissions had been altered, moved from the Local Admin group to Power User. You might like to check/update your permissions if you encounter this again.

  • Anonymous
    July 31, 2008
    The comment has been removed

  • Anonymous
    August 03, 2008
    The comment has been removed

  • Anonymous
    August 11, 2008
    The comment has been removed

  • Anonymous
    September 08, 2008
    I actually put in a wrong piece of code in the beggining and so it crashed every time i tried to debug the thing but after i commented out it, it is smmoth as silk........   :-)

  • Anonymous
    September 25, 2008
    The comment has been removed

  • Anonymous
    January 21, 2009
    PingBack from http://www.hilpers.it/1717025-framework-e-profilo-utente

  • Anonymous
    February 26, 2009
    The comment has been removed

  • Anonymous
    June 02, 2009
    I have the same problem with Ansys Workbench 12.0 I hope help johnjoviedo@gmail.com

  • Anonymous
    June 05, 2009
               //            // testcaseListView            //            this.testcaseListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {            this.numberColumnHeader,            this.titleColumnHeader,            this.testpathColumnHeader,            this.bitmapColumnHeader,            this.dirtyColumnHeader,            this.psCaseIDColumnHeader,            this.lastModifiedHeader});            this.testcaseListView.ContextMenuStrip = this.listViewContextMenuStrip;            this.testcaseListView.Dock = System.Windows.Forms.DockStyle.Left;            this.testcaseListView.FullRowSelect = true;            this.testcaseListView.GridLines = true;            this.testcaseListView.Location = new System.Drawing.Point(0, 0);            this.testcaseListView.Name = "testcaseListView";            this.testcaseListView.Size = new System.Drawing.Size(509, 162);            this.testcaseListView.TabIndex = 0;            //this.testcaseListView.UseCompatibleStateImageBehavior = false;

  • Anonymous
    June 09, 2009
    PingBack from http://hairgrowthproducts.info/story.php?id=4178

  • Anonymous
    July 08, 2009
    Hello, I got this error when I instaled my application on a windows vista station. System.IO.FileNotFoundException can anyone help me?

  • Anonymous
    July 21, 2009
    I've found an answer to this question. There are must be some libraries in the GAC, that you were miss put in there.

  • Anonymous
    August 03, 2009
    The comment has been removed

  • Anonymous
    August 03, 2009
    Hi Jatender, Seems you got a side-by-side issue, please check "%SystemRoot%winsxs" folder, if Microsoft.VC80.CRT exists there with correct version. If it doesn't, please find and install a right vc runtime version your application depends. Hope this helps. Thanks, Elton

  • Anonymous
    December 29, 2009
    I've figured out the problems that I had was because the event logs are full. After clearing these via event viewer (action->clear all Events), it fixes the problem. I've now automatically clear all events each time the service starts

  • Anonymous
    January 11, 2010
    The comment has been removed

  • Anonymous
    March 11, 2010
    I got the same error. It was due to error in the config file. I corrected it and it worked fine.

  • Anonymous
    March 23, 2010
    I had the same error, and it occured while running a windows service on windows server 2003. After trying many of the suggestions in this thread, a co-worker thought it might be a permissions issue. He was corect. If you are getting this while running a service on server 2003, make sure you have the proper permissions/security access/admin privlidges.

  • Anonymous
    March 31, 2010
    The comment has been removed

  • Anonymous
    April 17, 2010
    j'ai des error que faire pour les faire sortie de nom odinateur je ne ce que faire.

  • Anonymous
    April 17, 2010
    error s'il-vous plaít comonique~`a moi en Francês

  • Anonymous
    January 02, 2011
    The comment has been removed

  • Anonymous
    January 02, 2011
    The comment has been removed

  • Anonymous
    January 22, 2011
    My son also has the same issue EventType : clr20r3     P1 : rim.desktop.exe     P2 : 6.0.1.18     P3 : 4cfdab9c P4 : windowsbase     P5 : 3.0.0.0     P6 : 488f1338     P7 : 1357     P8 : 5c P9 : pszqoadhx1u5zahbhohghldgiy4qixhx Any clues ?

  • Anonymous
    February 14, 2011
    Hi. I also faced the similar issue, I was getting error while even opening/exporting the dts package from the sql server. I got to know the issue when i checked the event log corresponding to this error. There i could see the same error log as above. In my case the issue was that Microsoft.SqlServer.ManagedDts.dll (the correct version 9.0 something required for sql server 2005 ) was by mistake deleted. but thankfully i got it from recycle bin. Restored it and there i go.

  • Anonymous
    February 14, 2011
    Hi. I also faced the similar issue, I was getting error while even opening/exporting the dts package from the sql server. I got to know the issue when i checked the event log corresponding to this error. There i could see the same error log as above. In my case the issue was that Microsoft.SqlServer.ManagedDts.dll (the correct version 9.0 something required for sql server 2005 ) was by mistake deleted. but thankfully i got it from recycle bin. Restored it and there i go.

  • Anonymous
    March 08, 2011
    try to add this <runtime>        <legacyUnhandledExceptionPolicy enabled="true" />    </runtime> to ur config it will work fine

  • Anonymous
    March 10, 2011
    If you get an error with System.Data.Oracle, (it was my case) check your Oracle errors logs, I found an error with one table space.

  • Anonymous
    February 08, 2012
    I found that if it started when I included: using System.Media;

  • Anonymous
    November 27, 2013
    The comment has been removed