Search code examples
c#asp.netajaxcontroltoolkitparse-error

Parser Error Could not load AjaxControlToolkit


Parser Error Message: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified.

Yes I've seen the questions before here but I can't find the right answer for me:

So here is the error page: (Line 3 is highlighted)

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified.

Source Error:

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>

Source File: /aspsite/students.aspx Line: 3

Assembly Load Trace: The following information can be helpful to determine why the assembly 'AjaxControlToolkit' could not be loaded.


here is what I checked and tried suggested by other questions: ERROR Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies The hosting server is running on 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 The ajaxcontroltoolkit.dll is in the /bin folder, allong with all the other packages and stuff (it works in compiler mode in VS though)

Here is my web.config file:

<?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>

Also I have tried with IIS 7.5, here the students.aspx site works, finally :) I suspect it has something to do with the host, don't know what.

If it is useful: The rest of the site is working perfectly well: php,.inc,stylesheet.. all perfect... but that one page with asp keeps bugging me. Thanks for the help in advance.


Solution

  • So easy yet so hard to find: As I was saying, on a local IIS Web Site it was working, so I found it very strange to mess with web.config. It works locally, why not on a hosting Website:

    Solution: Go to your hosting control panel, in my case to the application tab, select the folder of your website and click 'Convert Folder to Application'. Pretty obvious now you think of it, In the IIS manager you do exactly the same, I thought that the hosting website would do it automatically.

    Hosting: http://somee.com Using it for testing my websites, they offer a free limited hosting (sorry purpose is not to advertise it)