How to Overcome this NeatUpload Object Reference Error?

拟墨画扇 提交于 2019-12-04 06:44:09

问题


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?


回答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.




回答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....



来源:https://stackoverflow.com/questions/10402552/how-to-overcome-this-neatupload-object-reference-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!