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: I don't publish the page yet. The line 3422 throw this exception, when I try submit an upload in the url route "localhost/pageX/sameQueryString" "if (data.length === 0) throw Error.argument('data', Sys.Res.cannotDeserializeEmptyString);". But the upload works fine and the event _UploadComplete_ is called properly when I use the url "localhost/pageX"

Viewing all articles
Browse latest Browse all 4356

Trending Articles



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