[英]ASP.NET Ajax and “could not load type”
I have an ASP.NET web page with an Ajax file upload control. 我有一个带有Ajax文件上传控件的ASP.NET网页。 When I try to run my page, I'm told "Could not load type 'AjaxControlToolkit.AjaxFileUploadHandler' from assembly 'AjaxControlToolkit'."
当我尝试运行我的页面时,被告知“无法从程序集“ AjaxControlToolkit”中加载类型'AjaxControlToolkit.AjaxFileUploadHandler'。”
Here's my control: 这是我的控制权:
<ajaxtoolkit:AjaxFileUpload ID="AjaxFileUpload1" runat="server" />
Here's the relevant stuff in my web.config: 这是我的web.config中的相关内容:
<system.web>
<httpHandlers>
<add verb="*" path="AjaxFileUploadHandler.axd"
type="AjaxControlToolkit.AjaxFileUploadHandler,
AjaxControlToolkit"/>
</httpHandlers>
<pages>
<controls>
<add tagPrefix="ajaxtoolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolKit"/>
</controls>
</pages>
</system.web>
Here's my error message: 这是我的错误信息:
I'm running this app on Win Server 2k3 and IIS 6 and ASP.NET 4. It appears that my toolkit is the correct version. 我正在Win Server 2k3,IIS 6和ASP.NET 4上运行此应用程序。看来我的工具箱是正确的版本。
I feel like it's probably a simple mistake, but I can't seem to find it. 我觉得这可能是一个简单的错误,但似乎找不到。 Let me know if more info is helpful.
让我知道更多信息是否有帮助。 Thanks!
谢谢!
Jeremy 杰里米
This is a common problem. 这是一个普遍的问题。 Do a search for deleting ASP temporary files.
搜索删除ASP临时文件。 If that does not solved it, sometimes a reinstall of Ajax using package manager sometimes resolved it.
如果仍不能解决问题,有时使用软件包管理器重新安装Ajax有时可以解决问题。
Even I had this error 即使我有这个错误
Well, I solved by removing AjaxFileUploadHandler fro Web.Config file: 好吧,我通过从Web.Config文件中删除AjaxFileUploadHandler来解决:
<configuration>
<system.webServer>
<handlers>
<!--add name="AjaxFileUploadHandler" verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/-->
</handlers>
</system.webServer>
<system.web>
<httpHandlers>
<!--add verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/-->
</httpHandlers>
</system.web>
</configuration>
This solved my error above. 这解决了我上面的错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.