Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Unassigned: AjaxFileUpload control doesn't work with ASP Routing [27754]

$
0
0
When using ASP .NET routing, the AjaxFileUpload control throws an exception related to not being able to find the temp directory where the control stores the uploaded file.

It seems only routes that contain Route Data are affected, but I'm not sure about this.

The exception is:

Could not find a part of the path 'C:\Users\[user]\AppData\Local\Temp\_AjaxFileUpload\[fileId]'

The issue, and its solution, is documented here:

http://stackoverflow.com/questions/19115761/ajax-fileupload-route-querystring-directorynotfoundexception

I followed the directions in the posted solution by changing line 22 of the AjaxFileUpload.Control.pre.js file as follows:

this._uploadUrl = 'AjaxFileUploadHandler.axd';
to:
this._uploadUrl = '/AjaxFileUploadHandler.axd';

I don't pretend to understand the full issue here, but it would be nice if this control worked with routing so that I didn't have to run a fork of the Toolkit dll to have this work.
Comments: We introduced a new AjaxFileUpload property: __UseAbsoluteHandlerPath__. If set to true, client code will POST to the root of the web site instead of the url relative to the current browsing page. This will help to avoid routing-related issues. This feature will be available in the next v16.1 release.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>