I have noticed every time i select a client on the file the upload control post a small amount of data to the server and it causes an un-handled exception. Here is the exception message:
The file '/DigitalMailer.EDMS.CCC/ig_fua34sf345sdf13sdf3454erdsf2345asd3425df5235d54df345.aspx' does not exist.
Why?
Hey Lenny,
We have used such "fake" URL because we use our HTTPModule to upload files and it cannot have physical address. So till now for 11.1, 11.2 we didn't change this URL. Also we won't change it for 12.1 too. Also as you see it return status OK when file is uploaded.
Thanks,
Miro Hristov
But what if IG changes this url? Why would you post to a url that will never exist?
Hi Lenny,
I suppose you get this error when autostartupload is false. Then when you select file the fileupload submit this file (this is done ONLY to get information about file size). The server on the other side canceled this request because the target is NOT to upload file just to get its file size(read it from the request header). That's why you received such status - Aborted. I can propose 2 solutions:
1. Set autostartupload to TRUE(just in case you can test it)
OR
2. In your exception handler to ignore errors thrown from this URL. Your URL is something like this
http://localhost/fileupload2/ig_fua34sf345sdf13sdf3454erdsf2345asd3425df5235d54df345.aspx?key=qPv9BfybDzPb0cx2nRzXqp9Key8KJ6&command=fileSize
By the way in query string there is always parameter command=fileSize. So when there is request to this file and there is command=fileSize then you can ignore this or just to set another logic for managing exceptions in your handler.
Thanks,Miro Hristov
Maybe I need to clarify. The upload control is working. Uploading,progress messages etc. The issue is when a user clicks the button to select a file to upload, then closes the dialog. The upload control posts a small amount of data to the server. That post is what is throwing an exception. We only noticed it because we have an unhandled exception handler setup to catch any unhandled exception. That is the problem. The fileupload path is not the problem. All the handlers are setup correctly.
<system.webServer> <validation validateIntegratedModeConfiguration="false" /> <modules runAllManagedModulesForAllRequests="true"> <remove name="ScriptModule" /> <remove name="IGUploadModule" /> <remove name="ExceptionLoggerHttpModule" /> <add name="ExceptionLoggerHttpModule" type="DigitalMailer.EDMS.CCC.WebUI.HTTPHandlers.UnhandledExceptionLogger, CommunicationCenter.WebUI" /> <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add name="IGUploadModule" type="Infragistics.Web.UI.EditorControls.UploadModule, Infragistics35.Web.jQuery.v11.2, Version=11.2.20112.2086, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" preCondition="managedHandler" /> </modules> <handlers> <remove name="WebServiceHandlerFactory-Integrated" /> <remove name="ScriptHandlerFactory" /> <remove name="ScriptHandlerFactoryAppServices" /> <remove name="ScriptResource" /> <remove name="IGUploadStatusHandler" /> <add name="WebCaptchaImage" path="WebCaptchaImage.axd" verb="GET,HEAD" type="Infragistics.Web.UI.EditorControls.CaptchaImageHandler" /> <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add name="IGUploadStatusHandler" path="IGUploadStatusHandler.ashx" verb="*" type="Infragistics.Web.UI.EditorControls.UploadStatusHandler, Infragistics35.Web.jQuery.v11.2, Version=11.2.20112.2086, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" preCondition="integratedMode" /> </handlers> <security> <requestFiltering> <requestLimits maxAllowedContentLength="2147483648"/> </requestFiltering> </security> </system.webServer>
Hello Lenny,
Follow this sample here :
http://samples.infragistics.com/jquery/file-upload/client-side-events
Make sure you have the httpHandlers for the file upload correctly added to your project also all the resourcefiles for it added in the project.
<add key="fileUploadPath" value="~/Uploads" />
This register the uploaded files to be added to the Uploads folder so that it means that you need Uploads folder in your root.
I hope this helps.
For any further questions do not hesitate to contact me.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support