【问题标题】:Parser Error Could not load AjaxControlToolkit解析器错误无法加载 AjaxControlToolkit
【发布时间】: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


【解决方案1】:

很容易找到却很难: 正如我所说,在本地 IIS 网站上它正在工作,所以我发现弄乱 web.config 很奇怪。它在本地工作,为什么不在托管网站上工作:

解决方案: 转到您的主机控制面板,在我的情况下,转到应用程序选项卡,选择您网站的文件夹,然后单击“将文件夹转换为应用程序”。 现在你想起来很明显,在 IIS 管理器中你做的完全一样,我认为托管网站会自动完成。

主机:http://somee.com 用它来测试我的网站,他们提供了一个免费的有限托管(对不起,目的不是做广告)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-12-03
    • 2013-11-04
    • 2016-12-23
    • 2018-05-15
    • 1970-01-01
    • 2022-06-10
    • 1970-01-01
    相关资源
    最近更新 更多