PRB: "System.NullReferenceException" Unhandled Exception Error Occurs When You Run a .NET Portable Executable in Internet Explorer (815635)
The information in this article applies to:
- Microsoft .NET Framework 1.1
- Microsoft .NET Framework 1.0
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual Basic .NET (2002)
- Microsoft Visual C# .NET (2003)
- Microsoft Visual C# .NET (2002)
Beta Information This article discusses a Beta release of a Microsoft
product. The information in this article is provided as-is and is subject to
change without notice.
No formal product support is available from
Microsoft for this Beta product. For information about how to obtain support
for a Beta release, see the documentation that is included with the Beta
product files, or check the Web location from which you downloaded the release.
SYMPTOMSWhen you run a .NET Portable Executable (PE) in Microsoft
Internet Explorer, and the PE accesses certain members of the System.Windows.Forms.Application class, an error may occur. The relevant members of the System.Windows.Forms.Application class include:
- CommonAppDataRegistry
- CompanyName
- ProductName
- ProductVersion
- UserAppDataRegistry
You may receive the following error message: An unhandled exception of type 'System.NullReferenceException'
occurred in mscorlib.dll. Additional information: Object reference not set
to an instance of an object. CAUSEThe .NET Framework assemblies that deploy from an intranet
are typically granted the default Intranet Permissions set. The error occurs
when the assembly is run from Internet Explorer. Internet Explorer does not
have sufficient permissions to access the methods. For additional information, click the following article
number to view the article in the Microsoft Knowledge Base: 311301
INFO: How Internet Explorer Determines Permissions for .NET Framework Assemblies
WORKAROUNDTo work around this problem, do not run the PE in Internet
Explorer. You must redirect to a Web page that prompts you to download the PE.
After you download the PE, you can run the PE from the command
prompt.
- or -
You can ignore the error message that you
receive. Move to the Temporary Internet Files directory and then copy the PE to
a local folder. Run the PE from the command prompt. You can typically find
temporary Internet files at the following location:
C:\Documents and
Settings\UserName\Local Settings\Temporary Internet FilesSTATUS This
behavior is by design.
Modification Type: | Minor | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbWindowsForms kbWebServer kbConsole kbweb kbprb KB815635 kbAudDeveloper |
---|
|