FIX: Error message when you compile an ASP.NET project that contains many application resource files: "A first chance exception of type 'System.ArgumentException' occurred in mscorlib.dll"

Article translations Article translations
Article ID: 961902 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

You have a Microsoft ASP.NET project that contains many application resources (.resx) files. The file names do not include a language and a culture between ".aspx" and ".resx."

For example, you have pages that are named AspxPageKeyXX.aspx. You also have .resx files in the App_LocalResources folder that are named AspxPageKeyXX.aspx.resx. These files are instead of or in addition to the .resx files that include a culture identifier (for example, AspxPageKey400.aspx.ru.resx).

You experience the following problems when the computer is running Microsoft .NET Framework 2.0 Service Pack 2 (SP2):
  • When you compile the project, it makes much longer than when the file names include a culture.
  • When you run the project, you receive the following error message in the output window many times:
    A first chance exception of type 'System.ArgumentException' occurred in mscorlib.dll
    Note The exception is reported when the Show output from option is set to Debug.

RESOLUTION

Hotfix Replacement Information

The hotfix that corresponds to KB961902 has been superseded with the hotfix KB981201, which contains all fixes that were previously included in KB961902.  You should use the hotfix KB981201 to fix the issues described in KB961902. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
981201 A hotfix is available for ASP.NET 2.0 that enables support for extended protection

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information, click the following article number to view the article in the Microsoft Knowledge Base:
917414 How to use application resource files (.resx) to efficiently create a localizable ASP.NET Web application

Properties

Article ID: 961902 - Last Review: August 4, 2010 - Revision: 4.0
APPLIES TO
  • Microsoft .NET Framework 2.0
  • Microsoft ASP.NET 2.0
Keywords: 
kbhotfixserver kbexpertiseadvanced kbqfe kbsurveynew KB961902

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com