BUG: An "Object reference not set to an instance of an object" error occurs when you try to access data by using ADO Interop on an ASP.NET page (810098)
The information in this article applies to:
- Microsoft ASP.NET (included with the .NET Framework) 1.0
- Microsoft ASP.NET (included with the .NET Framework 1.1)
- Microsoft ADO.Net 2.0
- ActiveX Data Objects (ADO) 2.6
- ActiveX Data Objects (ADO) 2.7
- Microsoft ADO.NET (included with the .NET Framework 1.1)
Caution ADO and ADO MD have not been fully tested in a Microsoft .NET Framework environment. They may cause intermittent issues, especially in service-based applications or in multithreaded applications. The techniques that are discussed in this article should only be used as a temporary measure during migration to ADO.NET. You should only use these techniques after you have conducted complete testing to make sure that there are no compatibility issues. Any issues that are caused by using ADO or ADO MD in this manner are unsupported. For more information, see the following article in the Microsoft Knowledge Base: 840667 You receive unexpected errors when using ADO and ADO MD in a .NET Framework application SYMPTOMSOn a computer that has Microsoft .NET Framework 1.0
installed (and that does not have Microsoft Visual Studio .NET installed), when you try to
access data using ADO Interop on an ASP.NET page that resides at an identical site
and that is hosted on the same computer, you may receive the following error
message: Exception Details:
System.NullReferenceException: Object reference not set to an instance of an
object. RESOLUTIONTo resolve this problem, register the Adodb.dll file in the
global assembly cache (GAC). On a computer where only the .NET Framework is
installed, the file Gacutil.exe does not exist.. Either obtain the gacutil file
by installing Microsoft .NET Framework SDK, or create a Visual Studio.NET setup
project that uses the installer to install the correct components. To
register Adodb.dll in the GAC, follow these steps:
- Click Start and then click
Run.
- In the Run dialog box, type the following
command, and then click OK:
C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\gacutil /i C:\Program
Files\Microsoft.NET\Primary Interop Assemblies\adodb.dll
STATUS Microsoft
has confirmed that this is a problem in the Microsoft products that are listed
at the beginning of this article.
REFERENCESFor more information about registering .dll files in the
GAC, visit the following Microsoft Web site:
Modification Type: | Major | Last Reviewed: | 6/15/2006 |
---|
Keywords: | kbtshoot kberrmsg kbBug kbWebForms KB810098 kbAudDeveloper |
---|
|