Monday, September 26, 2005

Error Message: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object

I was facing this problem earlier. Manage to solve it. I was trying to use the command "Request.postedfile" in ASP.NET/ VB.NET. I searched for the string above and arrive on Microsoft website. The cause of the problem stated in Microsoft Website wasn't the same as what I'm facing. An excerpt on Microsoft Help and Support website about the symptoms;

On 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:

I followed the solution stated and my problem was solved. I didn't use any of ADO Interop on my page but still... Well, only Microsoft knows. The solution is..

1. Click Start and then click Run.
2. 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

*It is advisable to Copy and paste the command above. However, the Windows folder may vary depending of what type of Windows(Win XP or Win NT). Mine was running on Win NT which I changed it to..

C:\WINNT\Microsoft.NET\Framework\v1.0.3705\gacutil /i C:\Program Files\Microsoft.NET\Primary Interop Assemblies\adodb.dll

Reference: BUG: Object Reference is Not Set to an Instance of an Object

Your Ad Here