WebFileUploader causes server-side error after page load

1 reply. Last post: March 13, 2011 11:40 PM by Yudi
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Mike DearmanMember

I am loading a page with a WebFileUploader control on it.

Using an HTTP debugger, I am watching the traffic to try to track down an Unhandled Error I'm logging at the server.

On the GET request generated by the control for: http://hostname/app/MyPage.aspx?x=HcEpOtYzAss5KpkQIMA8I-A0LsgyKII5Kc05cpFtf5Rtac84NtI8I9E4cpBpfoR9ED3T&IsUploadPage=true&UploadId=oUpload_FileUpload

where its adding the IsUploadPage and UploadId arguments, its generating an error while returning the page HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head><title></title><style id="wfu_styles" type="text/css">body {margin:0px;border:0px;padding:0px;overflow:hidden} </style></head> <body onload="if (typeof(handleLoad) != 'undefined') handleLoad()" onkeydown="if (typeof(handleKeyDown) != 'undefined') handleKeyDown()" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <form name="frmUpload" method="post" action="FileUpload.aspx?HcEpOtYzAss5KpkQIMA8I-A0LsgyKII5Kc05cpFtf5Rtac84NtI8I9E4cpBpfoR9ED3T&amp;IsUploadPage=true&amp;UploadId=oUpload_FileUpload" id="frmUpload" onsubmit="return beforeSubmit()" enctype="multipart/form-data"><div><input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="" /></div><input type="file" name="oUpload_FileUpload" id="oUpload_FileUpload" style="position:relative;overflow:hidden;height:22px;left:-140px;" /></form> </body></html>

 

The error is:

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.InvalidOperationException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.
   at System.Web.UI.ScriptManager.get_IPage()
   at System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e)
   at System.Web.UI.Page.OnPreRenderComplete(EventArgs e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   --- End of inner exception stack trace ---
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.lform_fileupload_aspx.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 

What is causing this?  Thanks!

Mike

All times are GMT -5. The time now is 6:23 PM.
Previous Next