0

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.

Community
  • 1
  • 1
CularBytes
  • 8,367
  • 6
  • 65
  • 94
  • Do you have any other pages using AjaxControlToolkit ? and if so are they working? – Archlight Jul 23 '14 at 06:53
  • No, only this page. I'm trying to see if a new WebForm does work... – CularBytes Jul 23 '14 at 09:17
  • No luck, getting the same error or more complicated errors, WHYYY – CularBytes Jul 23 '14 at 09:44
  • 1
    remove the dependency and rebuild, and then add the dependency again. Either you are referencing the wrong version or the project is not finding the dll which is harder than you think. look at http://msdn.microsoft.com/en-us/library/yx7xezcf.aspx on how the .net locates its assemblies (dll's) – Archlight Jul 23 '14 at 10:56
  • Not sure how to remove 'the dependency' Version of the .dll is 4.1.7.1213 Currently made new project, followed these steps: http://stephenwalther.com/archive/2012/09/20/september-2012-release-of-the-ajax-control-toolkit published it, but as usual, Error after Error... – CularBytes Jul 23 '14 at 12:36
  • No luck with your page..sadly, I've tried deleting , rebuild and added it later..no luck eather – CularBytes Jul 23 '14 at 13:07

1 Answers1

1

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)

CularBytes
  • 8,367
  • 6
  • 65
  • 94