This project has moved. For the latest updates, please go here.

Exception Details: System.NullReferenceException

Aug 5, 2010 at 9:36 PM

Hi Guys,

I'am have a problem with NeatUpload on my pages:

Object reference not set to an instance of an object.

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

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Brettle.Web.NeatUpload.UploadHttpModule.Application_BeginRequest(Object sender, EventArgs e) +273
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4205

<!-- [NullReferenceException]: Object reference not set to an instance of an object. at Brettle.Web.NeatUpload.UploadHttpModule.Application_BeginRequest(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --><!-- This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->

After modify this code in my web.config this error ocorred in all pages .net:

<modules>
    ...
    <add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule, Brettle.Web.NeatUpload" preCondition="managedHandler"/>
</modules>

I added "NeatUpload" in root, in virtual dir, in all pages but i dont have sucess...

My URL Page: www.helikits.net/new

Thanks,

Cleder

 

 

Aug 5, 2010 at 10:00 PM

Cleder

Are you using IIS 7??

Aug 5, 2010 at 11:01 PM

Yes, my hosts is IIS 7!

Aug 6, 2010 at 1:05 PM

So neatupload works without this in your web.config file ???

Aug 6, 2010 at 11:20 PM
Edited Aug 6, 2010 at 11:20 PM
Daniel_Covington wrote:

So neatupload works without this in your web.config file ???

 

Good question Daniel, I will test!

Aug 6, 2010 at 11:41 PM

Result Teste

Test 1.  Removing from web.config "<modules>"

<modules>

...

<add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule, Brettle.Web.NeatUpload" preCondition="managedHandler"/>

</modules>

Result:

All pages without NeatUpload --> ok

Pages with NeatUpload --> error:

Server Error in '/new' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load file or assembly 'Brettle.Web.NeatUpload, Version=1.3.3708.40379, Culture=neutral, PublicKeyToken=c95290d92c5893c8' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

Line 1:  <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="sendimagem.aspx.vb" Inherits="Helikits_Network.sendimagem" %>
Line 2:  
Line 3:  <%@ Register assembly="Brettle.Web.NeatUpload" namespace="Brettle.Web.NeatUpload" tagprefix="Upload" %>


Source File: /new/cadastros/sendimagem.aspx    Line: 1

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Brettle.Web.NeatUpload, Version=1.3.3708.40379, Culture=neutral, PublicKeyToken=c95290d92c5893c8' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

 

Test 2.  Removing from web.config "<httpModules>"

<httpModules>
...

<add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule, Brettle.Web.NeatUpload" />

</httpModules>

PS. Add NeatUpload in Modules tags

Result:

First error of topic in all pages.

 

Test 3. Removing from web.config "<modules>" and "<httpModules>"

Result equal to the first test:

All pages without NeatUpload --> ok

Pages with NeatUpload --> error

 

Cleder

 

Aug 9, 2010 at 11:23 AM

The .NET Assembly loader is unable to find the assembly Brettle.Web.NeatUpload, Version=1.3.3708.40379, Culture=neutral, PublicKeyToken=c95290d92c5893c8'.  So the assembly that was requested that has this version and public key cannot be found that is why you get this error. Make sure that the application can find the right assembly by putting it in the GAC or in the application path by adding a reference to it. If the assembly is not in the GAC it usually needs to go in the bin folder.