我尝试了那篇文章中提到的所有内容,但我似乎无法让它工作,我也给C:\ Windows \ Temp_AjaxFileUpload
提供完整的写权限这是我的代码
WebForm1.aspx的
<?xml version="1.0" encoding="UTF-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<httpHandlers>
<add verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit" />
</httpHandlers>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<handlers>
<add name="AjaxFileUploadHandler" verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit" />
</handlers>
</system.webServer>
<location path="AjaxFileUploadHandler.axd">
<system.webServer>
<security>
<authorization>
<add accessType="Allow" users="*"/>
</authorization>
</security>
</system.webServer>
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
</configuration>
的Web.config
#Software: Microsoft Internet Information Services 7.5
#Version: 1.0
#Date: 2016-06-14 07:25:01
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
2016-06-14 07:25:01 ::1 DEBUG /AjaxFileUpload_Test/WebForm1.aspx - 80 - ::1 - 401 0 0 60
2016-06-14 07:25:03 ::1 GET /AjaxFileUpload_Test/WebForm1.aspx - 80 - ::1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko 200 0 0 354
2016-06-14 07:25:03 ::1 GET /AjaxFileUpload_Test/__browserLink/requestData/e2f4a8e002fe4f38afcb6f92aa282f6d version=2 80 - ::1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko 200 0 0 33
2016-06-14 07:25:12 ::1 POST /AjaxFileUpload_Test/WebForm1.aspx contextKey=AjaxFileUpload1&start=1&queue=1& 80 - ::1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko 200 0 0 3652
2016-06-14 07:25:12 ::1 POST /AjaxFileUploadHandler.axd contextKey=AjaxFileUpload1&fileId=5CBB390C-9248-7FD8-AD8E-7A07B3A20C61&fileName=uploadtest.zip&chunked=false&firstChunk=true 80 - ::1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko 404 0 2 1
2016-06-14 07:25:12 ::1 POST /AjaxFileUpload_Test/WebForm1.aspx contextKey=AjaxFileUpload1&done=1&guid=5CBB390C-9248-7FD8-AD8E-7A07B3A20C61& 80 - ::1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko 200 0 0 33
它在IIS Express中运行良好,但不能通过本地IIS运行,即使应用程序池在管理员用户帐户下运行也是如此。想法?
下面是IIS日志,虽然HTTP处理程序已注册,但我发现回帖有404错误,这有关系吗?
{{1}}
答案 0 :(得分:2)
我解决了这个问题!看起来像参考 - &gt; https://github.com/DevExpress/AjaxControlToolkit/issues/43
让我在这里发帖,供其他人参考。
* AjaxFileUpload客户端代码期望应用程序root位于http://localhost/,因此它调用http://localhost/AjaxFileUploadHandler.axd url。 您可以通过执行以下步骤来调整此行为: