【发布时间】:2014-07-24 15:16:13
【问题描述】:
解析器错误消息:无法加载文件或程序集“AjaxControlToolkit”或其依赖项之一。系统找不到指定的文件。
是的,我在这里看到了之前的问题,但我找不到适合我的正确答案:
所以这里是错误页面:(第 3 行突出显示)
说明:解析服务此请求所需的资源时出错。请查看以下特定的解析错误详细信息并适当地修改您的源文件。
解析器错误消息:无法加载文件或程序集“AjaxControlToolkit”或其依赖项之一。系统找不到指定的文件。
来源错误:
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="students.aspx.cs" Inherits="students" %>
Line 2:
Line 3: <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
Line 4:
Line 5: <!DOCTYPE html>
源文件:/aspsite/students.aspx 行:3
程序集加载跟踪:以下信息有助于确定无法加载程序集“AjaxControlToolkit”的原因。
这是我检查并尝试过的其他问题: ERROR Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies 托管服务器运行在 ASP.NET 4.0, 4,5
Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified ajaxcontroltoolkit.dll 与所有其他包和东西一起位于 /bin 文件夹中(尽管它在 VS 中以编译器模式工作)
这是我的 web.config 文件:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="studentHousesConnectionString" connectionString="Data Source=ruudpc;Initial Catalog=studentHouses;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<customErrors mode="Off"></customErrors>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
</assemblies>
</compilation>
<pages>
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
</pages></system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.4" newVersion="2.1.0.4" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
我也尝试过使用 IIS 7.5,这里的 students.aspx 网站终于可以工作了 :) 怀疑跟楼主有关系,不知道是什么原因。
如果它有用:站点的其余部分运行良好:php、.inc、stylesheet.. 都完美...但是带有 asp 的一页一直困扰着我。 提前感谢您的帮助。
【问题讨论】:
-
您还有其他使用 AjaxControlToolkit 的页面吗?如果是的话,他们在工作吗?
-
不,只有这一页。我正在尝试查看新的 WebForm 是否有效...
-
不走运,遇到同样的错误或更复杂的错误,为什么
-
移除依赖并重建,然后重新添加依赖。要么你引用了错误的版本,要么项目没有找到比你想象的更难的 dll。查看msdn.microsoft.com/en-us/library/yx7xezcf.aspx .net 如何定位其程序集(dll)
-
不确定如何删除“依赖项” .dll 的版本是 4.1.7.1213 目前制作的新项目,按照以下步骤操作:stephenwalther.com/archive/2012/09/20/… 发布了它,但像往常一样,Error after Error.. .
标签: c# asp.net ajaxcontroltoolkit parse-error