Beta Information This article discusses the beta version of some Microsoft product. The information in this article is provided as "as", if there is any change without notice.
Microsoft does not provide formal product support to this Beta product. For information on how to get support for Beta versions, see the documentation included in the beta product file, or view the web location you downloaded this version.
Symptom If you run a .NET portable executable (PE) in Microsoft Internet Explorer, and this PE Access
Some members of the System.Windows.Forms.Application class may have errors.
Relevant members of the System.Windows.Forms.Application class include:
CommonAppdataaregistry CompanyName ProductName ProductVersion UserAppdataaregistry may appear 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.
Cause The .NET framework assembly is usually granted the default intranet permission set from the Intranet deployment. This error occurs when running the assembly from Internet Explorer. Internet Explorer does not have sufficient permissions to access these methods. For additional information, click the article number below to see the article in the Microsoft Knowledge Base:
311301 Info: How Internet Explorer Determines Permissions for .NET Framework Assemblies
Alternative methods To resolve this issue, please do not run the PE in Internet Explorer. You must redirect to a prompt you download the web page of the PE. After downloading the PE, you can run the PE from the command prompt.
- or -
Ignore the error message. Move to the Temporary Internet files directory and copy the PE to a local folder. Run the PE from the command prompt. Temporary Internet Files can usually be found from the following location:
C: / Documents and Settings / UserName / Local Settings / Temporary Internet Files
This phenomenon is designed to make.
More information
Steps to reproduce this problem
Run Visual Studio .NET. Create a new console application called "NullReferenceDemo". You can use Visual Basic .NET or Visual C # .NET. In the Solution Explorer, right-click "NullReferenceDemo" and click Add Reference. Click Select "System.Windows.Forms.dll". Click Select, and then click OK. At this point, a reference to the item will be added. Replace existing code with code: Visual Basic .NET code Module Module1
Sub main ()
Console.writeline (System.Windows.Forms.Application.ProductVersion)
End Sub
End Modulevisual C # .NET Code Using System;
Namespace NullReferenceDemo
{
Class class1
{
[Stathread]
Static void main (string [] args)
{
Console.writeline (System.Windows.Forms.Application.ProductVersion);
}
}
} On the Generate menu, select Generate Solutions. Copy the NullReferenceDemo.exe file created in step 6 to the root folder of the web server. Run Internet Explorer. Type the following URL: http: //webserver/nullreferenceDemo.exe Note The name of Web Server is a web server. Click "Go to".
Reference
For additional information on the NullReferenceException class, please visit the following Microsoft Web site:
Http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemnullreferenceExceptionClasstopic.asp
The information in this article applies to:
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)
Recent Updated: 2003-7-3 (1.1) Keyword KBWindowsForms Kbweb Server Kbconsole Kbweb Kbprb KB815635 KBAUDDEVELOPER