I am creating an ASP .NET MVC 3 application. I followed this guide (http://help.infragistics.com/Help/NetAdvantage/jQuery/2011.1/CLR4.0/html/igUpload_Overview.html) and triple-checked that I had done everything as it said but I can't seem to get the upload to work.
The uploader renders correctly and I can click 'Upload File' and then select my file, but then I get an error telling me it can't find the resource because it is attempting go to the following URL:
Requested URL: /Import/ig_fua34sf345sdf13sdf3454erdsf2345asd3425df5235d54df345.aspx
Import is the name of my controller. The rest of my code is as follows:
I have put in the handler code
<system.webServer> <modules runAllManagedModulesForAllRequests="true"> <add name="IGUploadModule" type="Infragistics.Web.Mvc.UploadModule" preCondition="managedHandler" /> </modules> <handlers> <add name="IGUploadStatusHandler" path="IGUploadStatusHandler.ashx" verb="*" type="Infragistics.Web.Mvc.UploadStatusHandler" preCondition="integratedMode" /> </handlers> </system.webServer>
and the route code
public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("IGUploadStatusHandler.ashx"); routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); ... }
and in my view
@( Html.Infragistics().Upload() .ID("igUpload1") .AutoStartUpload(true) .ProgressUrl("/IGUploadStatusHandler.ashx") .Render())
What am I doing wrong?
Hi danenatoli,
When you click upload what is happening exactly - you are redirected to /Import/ig_fua34sf345sdf13sdf3454erdsf2345asd3425df5235d54df345.aspx? Or just you see this in Developer Tools/Firebug, etc? By the way you can check also these samples: http://samples.infragistics.com/jquery/file-upload/. In this section you can find some useful samples for fileupload and how to configure it in MVC.
Thanks,
Miro Hristov
I see that in Firebug.
Hello Denatoli,
Thank you for posting in our community.
For any further questions and assistance that you may need, please do not hesitate to contact Infragistics Team.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
Hi denatoli,
I am glad to see that you get it working. About this error it is normal. The idea is that it should be made such request to the server and our HTTPModule to get this request and to process it. It is normal to return that this address is not found.
Thanks for using our controls.
Regards,
Managed to get it working, I was using the IIS 7 handlers and not the IIS 6 / Development handlers.