This project has moved. For the latest updates, please go here.

Microsoft JScript runtime error: Object required

May 1, 2009 at 7:05 PM
So far it went pretty smooth. I integrated the Multifile upload into a existing asp.net app. Now when I pick a file and try to upload it I get the following error - Microsoft JScript runtime error: Object required

When debugging the debugger is jumping around in the javascripts of the page and I don't know what to make of it. Can somebody help me get past this, thanks.
Coordinator
May 1, 2009 at 7:36 PM
If you don't need any javascript events / properties, just remove all the javascript stuff. It's not needed and the control works fine without javascript.
May 1, 2009 at 9:14 PM
Thank you for your quick response. I removed the javascript from my aspx page and this attribute -

OnPluginLoaded

 

="pluginLoaded"

 

Now I don't get any errors. Now it tells me that the upload failed. I have a break point in the handlers ProcessRequest method but it never gets there. Here is what the control code looks like:

 <asp:Silverlight ID="MultiFileUploadControl" runat="server" Source="~/ClientBin/mpost.SilverlightMultiFileUpload.xap" MinimumVersion="2.0.31005.0" Width="415" Height="280" InitParameters="HttpUploader=true,MaxFileSizeKB=,MaxUploads=2,FileFilter=,CustomParam=yourparameters,DefaultColor=#db8031" />

I am using IIS7 do I need to add the handler to the handlers in the web.config to make this work?

 

 

 

 

May 1, 2009 at 10:10 PM
Just wanted to clarify and make sure I have all the files need in my solution to make this work with the HttpUploadHandler.

I added the ClientBin folder and within the folder the mpost.SilverlightMultiUpload.xap control.
.
Then I added the HttpUploadHandler.ashx to my Handler folder.

Added this line to my web.config -

<

 

add tagPrefix="asp" namespace="System.Web.UI.SilverlightControls" assembly="System.Web.Silverlight" />

 

Added the System.Web.Silverlight.dll to my Bin folder.

Added control to my aspx page

<

 

asp:Silverlight ID="MultiFileUploadControl" runat="server" Source="~/ClientBin/mpost.SilverlightMultiFileUpload.xap" MinimumVersion="2.0.31005.0" Width="415" Height="280" InitParameters="HttpUploader=true,MaxFileSizeKB=,MaxUploads=2,FileFilter=,CustomParam=yourparameters,DefaultColor=#db8031" />

 

When I run your sample solution  it works great but the control within my solution does not call the handler code. I am using VS 2008 and IIS7. What am I missing?
May 1, 2009 at 10:49 PM
Edited May 4, 2009 at 9:19 PM
I turns out I need to add the handler to the web.config file to make it work. Here is what I added

<add name="HttpUploadHandler" path="HttpUploadHandler.ashx" verb="*" type="WebApplication.Handler.HttpUploadHandler" resourceType="Unspecified" preCondition="integratedMode" />