File Upload

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
1/11/2009 3:26:02 PM
Gravatar
Total Posts 14

File Upload

I have just uploaded the latest release to my hosting site at discountasp.net. So far most looks great. I am unable to upload files for some reason.

2.2.8.2 MSSQL and SQL 2005. Any help would be appreciated.

Dave Trachsel

routeadmin.com

Server Error in '/' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

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.]
mojoPortal.Web.SharedFilesUI.SharedFilesModule.btnUpload_Click(Object sender, EventArgs e) +604
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

From System Log:

2009-01-11 12:55:59,920 ERROR mojoPortal.Web.AdminUI.ModuleSettingsPage - ModuleSettings.aspx.cs error getting resource for s.SettingName GalleryAllowFullSizeViewSetting
System.NullReferenceException: Object reference not set to an instance of an object.
at mojoPortal.Web.AdminUI.ModuleSettingsPage.AddSettingControl(CustomModuleSetting s)
2009-01-11 12:56:47,966 INFO mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task
2009-01-11 12:56:47,998 INFO mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread
2009-01-11 12:56:48,107 INFO mojoPortal.Business.WebHelpers.IndexWriterTask - deserialized IndexWriterTask task
2009-01-11 12:56:48,107 INFO mojoPortal.Business.WebHelpers.IndexWriterTask - Queued IndexWriterTask on a new thread
2009-01-11 12:57:38,794 INFO mojoPortal.Business.WebHelpers.IndexWriterTask - started IndexWriterTask task
2009-01-11 12:57:49,747 INFO mojoPortal.Web.WebTaskManager - started WebTaskManager task
2009-01-11 13:04:59,960 INFO mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task
2009-01-11 13:04:59,976 INFO mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread
2009-01-11 13:05:00,085 INFO mojoPortal.Business.WebHelpers.IndexWriterTask - deserialized IndexWriterTask task
2009-01-11 13:05:00,085 INFO mojoPortal.Business.WebHelpers.IndexWriterTask - Queued IndexWriterTask on a new thread
2009-01-11 13:05:50,381 INFO mojoPortal.Business.WebHelpers.IndexWriterTask - started IndexWriterTask task
2009-01-11 13:06:00,131 INFO mojoPortal.Web.WebTaskManager - started WebTaskManager task
2009-01-11 13:07:16,021 INFO mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task
2009-01-11 13:07:16,036 INFO mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread
2009-01-11 13:07:16,130 INFO mojoPortal.Business.WebHelpers.IndexWriterTask - deserialized IndexWriterTask task
2009-01-11 13:07:16,130 INFO mojoPortal.Business.WebHelpers.IndexWriterTask - Queued IndexWriterTask on a new thread
2009-01-11 13:07:57,223 ERROR mojoPortal.Web.mojoBasePage - 72.199.108.106-en-US - /files.aspx
System.NullReferenceException: Object reference not set to an instance of an object.
at mojoPortal.Web.SharedFilesUI.SharedFilesModule.btnUpload_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
2009-01-11 13:07:57,880 ERROR mojoPortal.Web.Global - 72.199.108.106-en-US - /files.aspx
System.NullReferenceException: Object reference not set to an instance of an object.
at mojoPortal.Web.SharedFilesUI.SharedFilesModule.btnUpload_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
2009-01-11 13:08:06,411 INFO mojoPortal.Business.WebHelpers.IndexWriterTask - started IndexWriterTask task
2009-01-11 13:08:16,208 INFO mojoPortal.Web.WebTaskManager - started WebTaskManager task
2009-01-11 13:20:45,073 ERROR mojoPortal.Web.mojoBasePage - 72.199.108.106-en-US - /files.aspx
System.NullReferenceException: Object reference not set to an instance of an object.
at mojoPortal.Web.SharedFilesUI.SharedFilesModule.btnUpload_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
2009-01-11 13:20:45,073 ERROR mojoPortal.Web.Global - 72.199.108.106-en-US - /files.aspx
System.NullReferenceException: Object reference not set to an instance of an object.
at mojoPortal.Web.SharedFilesUI.SharedFilesModule.btnUpload_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 

 

1/12/2009 5:53:43 AM
Gravatar
Total Posts 18439

Re: File Upload

Hi Dave,

You didn't mention if you are running in Medium Trust, but my guess is you are running in Medium Trust. In Medium Trust I experienced this null reference exception and found that the real error is that the file is larger than allowed to be uploaded so it does not get uploaded and results in this null reference. If you try a very small file it will work. Then if you want to allow larger files, look for this in comments near the bottom of the system.web section of Web.config:

<httpRuntime maxRequestLength="2097151" executionTimeout="360" useFullyQualifiedRedirectUrl="true" />

Un-comment it and set the max size up to a maximum of 2097151 depending on how big the files you want to allow are.

Hope it helps,

Joe

 

1/12/2009 9:30:23 PM
Gravatar
Total Posts 14

Re: File Upload

Thanks very much for the help. Yes, it is Medium trust. I just read your reply and tried uploading the file again without making any changes and it worked this time. Yesterday, I uploaded a 1.7 gig picture to the gallery and then tried to upload it to the files section. It worked uploading to the gallery but not to the files.  I will keep an eye on the situation and adjust max size accordingly.

Regard,

Dave Trachsel

You must sign in to post in the forums. This thread is closed to new posts.