EPiFileUpload: Error - Fileupload failed with code 500

Vote:
 

Hi.

I'm having problem getting the drag and drop fileupload to work. I get as far as seeing the "EPiFileUpload version 1.0" dialog, but before any progress in shown in the progress bar, the error "File upload failed with code 500".

From the log i see the following error: <code>

2010-05-10 09:23:24,375 [1] ERROR EPiServer.Global [(null)] - 1.2.5 Unhandled exception in ASP.NET

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.InvalidOperationException: Using themed css files requires a header control on the page. (e.g. <head runat="server" />).

at System.Web.UI.PageTheme.SetStyleSheet()

at System.Web.UI.Page.OnInit(EventArgs e)

at EPiServer.PageBase.OnInit(EventArgs e)

at EPiServer.UI.OfficeIntegration.HandleMultiUpload.OnInit(EventArgs e)

at System.Web.UI.Control.InitRecursive(Control namingContainer)

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.ProcessRequestWithNoAssert(HttpContext context)

at System.Web.UI.Page.ProcessRequest(HttpContext context)

at ASP.secure_officeintegration_handlemultiupload_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5510bec5\fb866aad\App_Web_z8dqluie.0.cs:line 0

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

</code> I did check the Framework.Master (located in C:\Program Files\EPiServer\CMS\5.2.375.236\Application\UI\MasterPages\Frameworks\Framework.Master), and it already does say runat="server", so that doesn't seems to be the problem.

I've tried searching for solutions, without finding anyone describing the same problem. I've tried both the VirtualPathVersioningProvider and the VirtualPathNativeProvider. Running CMS5 R2.

Any suggestions would be greatly appreciated! :)

/Kjetil

 

#39298
May 10, 2010 9:47
Vote:
 

Hi Kjetil!

Do you have any PageThemes declared in web.config?
If so, try add a EnableTheming="false" to the <%@Page ... %> directove on the HandleMultipleUpload.aspx file.

/johan

#39307
May 10, 2010 13:13
Vote:
 

Hi

Thanks for replying. Yes, we have PageThemes enabled in web.config.

I tried your suggestion of adding EnableTheming="false" to the Page-directive in the HandleMultipleUpload.aspx file. We still get the same error, unfortunately.

Could it be related to the provider? We are using VirtualPathNativeProvider, and we have received two hotfixes from you regarding that provider.

I'm still open to (and happy for) any suggestions :)

/Kjetil

#39314
May 10, 2010 15:25
Vote:
 

No, I dont think its related to the provider. The stacktrace you posted above clearly indicates that the exception is thrown in System.Web.UI.PageTheme.SetStyleSheet(), and a quick look with Reflector on that class shows that the exception is thrown if the page doesnt contain a <head runat="server"> control.

Now, as the HandleMultiUpload.aspx is never intended to return any html at all (it just returns the statuscode of the operation), there is no such webcontrol (or in fact *any* control at all) declared in the markup, and if theming is applied to this page, which would be the case if its globally enabled through web.config, the exception your seeing will be thrown.

According to VS documentation, a single page can have theming disabled by using the statement, EnableTheming="false", and I havent been able to find any references to situations where this would not "work".

Make sure that you have added this statement to the correct "HandleMultiUpload.aspx". it would be located in:
C:\Program Files\EPiServer\CMS\5.2.375.236\Application\UI\OfficeIntegration

As these files are recompiled as needed when changed, it might also be a good idea to stop the webserver and then delete
all files from "c:\windows\microsoft.net\framework\v2.0.50727\Temporary ASP.NET Files". (They will be recreated automatically
when site startsup and the first requests are made to it).

/johan

#39319
May 10, 2010 16:31
Vote:
 

Hi

Thanks for pointing us to the right location. With your help we located the problem.

For some reason it doesn't check for the EnableTheming flag, so the SetStyleSheet() method is still called. Not sure if this is (by Microsoft design?) only applying to StyleSheetTheme, and not Theme. However, setting Theme="" instead, did the trick. (I guess you guys might want to file that under bugs.)

Thanks again,
Kjetil

#39331
May 11, 2010 9:38
Vote:
 

No problem, good to hear you sorted it out!

/johan

#39334
May 11, 2010 10:43
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.