Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

AjaxFileUpload randomly stopped working everywhere

$
0
0

Hi,

I have a strange problem which I can't figure out how to fix.

I've been using the AjaxFileUpload control recently (source code below).

<ajaxToolkit:AjaxFileUpload ID="ajaxFileUpload" runat="server" ThrobberID="MyThrobber" Width="500" OnUploadComplete="ajaxFileUpload_OnUploadComplete" /><asp:Image ID="MyThrobber" runat="server" ImageUrl="~/App_Themes/Style/AJAXLoading/uploading.gif" Style="display: None" />
protected void ajaxFileUpload_OnUploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
{
        // Generate file path
        string strFilePath = "~/FileUploads/" + e.FileName;
        // Save upload file to the file system
        ajaxFileUpload.SaveAs(MapPath(strFilePath));
}

Web Config I have added:

<configuration><configSections><sectionGroup name="system.web"><section name="sanitizer" requirePermission="false" type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit"/></sectionGroup></configSections><system.web><compilation debug="true" targetFramework="4.5"/><httpRuntime targetFramework="4.5"/><sanitizer defaultProvider="HtmlAgilityPackSanitizerProvider"><providers><add name="HtmlAgilityPackSanitizerProvider" type="AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider"/></providers></sanitizer><httpHandlers><add verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/></httpHandlers></system.web><system.webServer><handlers><add name="AjaxFileUploadHandler" verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit" /></handlers><security><requestFiltering><requestLimits maxAllowedContentLength="4294967295"/></requestFiltering></security></system.webServer></configuration>

It was working fine up until yesterday but then randomly stopped working. I can select file/s however they just stay at pending and nothing happens.

I decided to download the AjaxControlToolkit sample website just to try and get a working version, however suffered the same problem. I even visited the actual online sample site - http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ajaxFileUpload/ajaxFileUpload.aspx and found that the control has stopped working online for me (it was working previously). I have tried on Firefox, Chrome and IE.

Does anyone have any ideas how to fix this as I'm really confused as to why it has suddenly stopped working? Do I need to reset something in order to get the control to function again?

Thanks,

Daniel


Viewing all articles
Browse latest Browse all 5678

Trending Articles



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