How to Overcome this NeatUpload Object Reference Error?

Having installed NeatUpload (http://neatupload.codeplex.com/), and put the demo onto my server (Windows Server 2008 and IIS7), when I select an object in the combobox for the “Progress Bar Location”, and change it to “Inline”, I get an unhandled exception, Object reference not set to an instance of an object.. I can change it to “none” and “popup” without issue.

Here is my installation guide: How to Install NeatUpload?

Here is the stack trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Brettle.Web.NeatUpload.UploadModule.get_PostBackID() +18
   Brettle.Web.NeatUpload.ProgressBar.get_LastPostBackIDQueryStringPortion() +9
   Brettle.Web.NeatUpload.ProgressBar.OnPreRender(EventArgs e) +687
   System.Web.UI.Control.PreRenderRecursiveInternal() +107
   System.Web.UI.Control.PreRenderRecursiveInternal() +223
   System.Web.UI.Control.PreRenderRecursiveInternal() +223
   System.Web.UI.Control.PreRenderRecursiveInternal() +223
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3393

What is missing? I am able to view the “NeatUpload Console” okay, and can choose files for upload okay, and can change the “Submit button type” without issue. Also, I never do get any progressbar. The only thing I can think of is that my web-application runs in .net 2, and not .net 4 – if that be the problem, how do I fix it for the control without changing it for the web application (sharepoint 2010)? Could I have some file out of place?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

I got the same error as the question poster, but my fix was to switch the AppPool from Integrated to Classic pipeline. I am using IIS7.

I also think that you can add:

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

To the configuration/system.webServer/modules part of your Web.config to allow it to work in Integrated Pipeline Mode.

Method 2

Doh! Newbie problem. Any additions that need to be made in the web.config need to be added to the web.config at the root of the web-application – it won’t do to put any web.config files in the subfolders. A web.config file can only go in the root of a web-application. If we add a web-application in iis within the tree of another web-application, then we can add another web.config. But putting a web.config in a subfolder does not make that directory into a web-application. …Learning the hard way….


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x