We recently upgraded from version 10.2.8 to version 11.4 and ran into an issue with the UploadControl after the upgrade. After clicking the upload button the progress bar stays at 0% and I don't see it hitting the controller action. I was able to replicate the issue with a brand new project using the MVC version 11 (ASPX) Visual Studio project template. See the attachment for an example project.
In production I did notice through Fiddler that the ashx handler was returning a 404. Any help addressing this matter is greatly appreciated.
MVC UploadControl stopped working after upgrading to version 11.4
Answers
Hello Rob:
I am afraid it is difficult to say what the cause of this problem is in this case since it is not reproduced after all required modifications.
Please take a look at the following video and ensure that you have applied all settings correctly.
http://downloads.devexpress.com/UserShare/Temp/MVCUploadProgress.zip
Thanks
Kate.
Hello Rob:
I am glad to hear that the issue is solved. If you have other issues, related to our controls, please feel free to post corresponding reports. Our team always do its best to help you.
Thanks
Kate.
The instructions didn't help me at all. It came down to a missing folder, permissions on that folder and IIS being set the to Integrated vs. Classic.
Missing Folder was /App_Data/UploadTemp
Set Permissions for NETWORK SERVICE on that folder and it worked.
Did I miss this in the documentation someplace or was there another reason it was missing?
Can I change that path or use a different path if that one doesn't work for me?
Hello Jon,
To process your recent post more efficiently, I created a separate ticket on your behalf: T160854: ASPxUploadControl - How to set Upload / Temp Folder permissions. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
Hello Rob:
We already have a detailed discussion of a similar problem in the following report:
UploadControl - upload progress does not work in .NET Framework 4, web farm support
If this scenario is not similar to yours or you need additional information, please feel free to reactivate this ticket.
Thanks
Kate.
I tried the recommended solution but it still does not work for me.
When I click the Upoload button the progress bar stays stuck at 0%. Fiddler reveals that a script is polling a URL that cannot be found (404). This is the stack trace provided in the server response:
The request is:
GET /Web30/ASPxUploadProgressHandlerPage.ashx?DXProgressHandlerKey=05ad4e12-5b99-49ac-a687-37b6d1b8470d HTTP/1.1
This is the stack trace:
<!--
[HttpException]: The controller for path '/Web30/ASPxUploadProgressHandlerPage.ashx' was not found or does not implement IController.
at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType)
at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName)
at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<BeginProcessRequest>b__2()
at System.Web.Mvc.SecurityUtil.<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a()
at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust[TResult](Func`1 func)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
Now, here is some information on my environment:
Windows Server 2003 x64
IIS 6
.NET 4
Website is .NET 4
Website has wildcard application extension mapping to c:\windows\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll
Hope this helps and thankd for your assistance.
Another bit of information that might be useful, also notice the following two request/responses in Fiddler… Also please note that our website runs with integrated Windows security and the AppPool is running with my Windows account. Please be aware that all of this used to work fine in version 10.2.
#1
GET /Web30/ASPxUploadProgressHandlerPage.ashx?DXProgressHandlerKey=8d42f71f-c291-4a52-aaf3-4fd95e3244ce HTTP/1.1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>You are not authorized to view this page</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<STYLE type="text/css">
BODY { font: 8pt/12pt verdana }
H1 { font: 13pt/15pt verdana }
H2 { font: 8pt/12pt verdana }
A:link { color: red }
A:visited { color: maroon }
</STYLE>
</HEAD><BODY><TABLE width=500 border=0 cellspacing=10><TR><TD>
<h1>You are not authorized to view this page</h1>
You do not have permission to view this directory or page using the credentials that you supplied because your Web browser is sending a WWW-Authenticate header field that the Web server is not configured to accept.
<hr>
<p>Please try the following:</p>
<ul>
<li>Contact the Web site administrator if you believe you should be able to view this directory or page.</li>
<li>Click the <a href="javascript:location.reload()">Refresh</a> button to try again with different credentials.</li>
</ul>
<h2>HTTP Error 401.2 - Unauthorized: Access is denied due to server configuration.<br>Internet Information Services (IIS)</h2>
<hr>
<p>Technical Information (for support personnel)</p>
<ul>
<li>Go to <a href="http://go.microsoft.com/fwlink/?linkid=8180">Microsoft Product Support Services</a> and perform a title search for the words <b>HTTP</b> and <b>401</b>.</li>
<li>Open <b>IIS Help</b>, which is accessible in IIS Manager (inetmgr),
and search for topics titled <b>About Security</b>, <b>Authentication</b>, and <b>About Custom Error Messages</b>.</li>
</ul>
</TD></TR></TABLE></BODY></HTML>
#2
GET /Web30/ASPxUploadProgressHandlerPage.ashx?DXProgressHandlerKey=8d42f71f-c291-4a52-aaf3-4fd95e3244ce HTTP/1.1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>You are not authorized to view this page</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<STYLE type="text/css">
BODY { font: 8pt/12pt verdana }
H1 { font: 13pt/15pt verdana }
H2 { font: 8pt/12pt verdana }
A:link { color: red }
A:visited { color: maroon }
</STYLE>
</HEAD><BODY><TABLE width=500 border=0 cellspacing=10><TR><TD>
<h1>You are not authorized to view this page</h1>
You do not have permission to view this directory or page using the credentials that you supplied.
<hr>
<p>Please try the following:</p>
<ul>
<li>Contact the Web site administrator if you believe you should be able to view this directory or page.</li>
<li>Click the <a href="javascript:location.reload()">Refresh</a> button to try again with different credentials.</li>
</ul>
<h2>HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.<br>Internet Information Services (IIS)</h2>
<hr>
<p>Technical Information (for support personnel)</p>
<ul>
<li>Go to <a href="http://go.microsoft.com/fwlink/?linkid=8180">Microsoft Product Support Services</a> and perform a title search for the words <b>HTTP</b> and <b>401</b>.</li>
<li>Open <b>IIS Help</b>, which is accessible in IIS Manager (inetmgr),
and search for topics titled <b>Authentication</b>, <b>Access Control</b>, and <b>About Custom Error Messages</b>.</li>
</ul>
</TD></TR></TABLE></BODY></HTML>
Hello Rob:
I will discuss this issue with our developers and let you know our decision. Please accept our apologies for the delay in responding.
Thanks
Kate.
Hello Rob:
Please accept my apologies for the delay in responding.
This problem may be solved via the following steps:
<form id="form1" runat="server"> ... <% Html.DevExpress().UploadControl( settings => { settings.Name = "ucDocumentUpload"; settings.CallbackRouteValues = new { Controller = "Home", Action = "UploadDocument" }; }).Render(); %> ... </form>
public static void RegisterRoutes(RouteCollection routes) { ... routes.IgnoreRoute("{resource}.ashx/{*pathInfo}"); ... }
If this solution does not help, please reactivate this ticket.
Thanks
Kate.
I confirmed that the call to IgnoreRoute is there and that the control is inside a form. I still see that 404 error through Fiddler, it continuously tries to hit:
GET /Web30/ASPxUploadProgressHandlerPage.ashx?DXProgressHandlerKey=16fb27c5-3a9c-4932-bccc-261c7c4ce3dd HTTP/1.1
Any other ideas?