Share via


AJAX Error: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies

Question

Tuesday, August 12, 2008 6:02 AM

I have just configured the Ajax Control Toolkit.  I am trying to use the Calendar extender.

** When i run the system through the URL to where it is hosted i get the following error:**

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="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" title = "VDU Workstation Assessment | Main Menu" %>
Line 2:  
Line 3:  <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
Line 4:  
Line 5:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Source File: /vduassessment/default.aspx **   Line:** 3

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

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

If i run the system through Visual Studio i also get an error when trying to run the program:

Unknown server tag cc1:CalendarExtender

 I** have searched through several forums but cannot seem to find the answer.**

Thanks in adavnce!

All replies (14)

Wednesday, August 13, 2008 8:19 AM âś…Answered

I'm running it through VS and it seems to work fine, when I saved it to another drive to show my boss this is the error message I got:

Warning 1 Unable to update auto-refresh reference 'ajaxcontroltoolkit.dll'. Cannot find assembly 'C:\Documents and Settings\JGAROFALO\Local Settings\Application Data\Microsoft\VisualStudio\9.0\ProjectAssemblies\sshmgfrg01\AjaxControlToolkit.dll'. When I traced the path back through my C: drive this piece was missing  sshmgfrg01, so i'm not sure if the toolkit download incorrectly or what. I'm going to try uninstalling and re-installing first then go from there

I got this one as well.

Unknown server tag cc1:CalendarExtender

if you find this topic; Re: Assembly Reference Issue, I was givin to seperate links to try and trouble shoot. I'm not sure if any of them work just yet. I'm going to read through them and try them out today. If I come up with any solution I'll post it, if I come up empty I'll post it as well. . Good Luck and please post any results.

Thanks,

Janis

 


Tuesday, August 12, 2008 7:22 AM

 Hi

Try the following

1.) Add AjaxControlToolkit.dll in your application bin folder ( which I think you have already done ).

2.) In your application's webconfig file include the following line inside the controls tag  attribute of page tag   :-

        <pages>
            <controls>
                <add tagPrefix="ajax" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
                <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
            </controls>
        </pages>

I have given tag prefix as ajaxtoolkit .  


Tuesday, August 12, 2008 7:54 AM

Thanks for your quick reply Pawan.

 Within my page i still have the line <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>.

 Should i change the tagprefix="cc1" to something that matches within the web.config file?

When i add an extender it is still using the prefix cc1.

Cheers,

Jon


Tuesday, August 12, 2008 8:12 AM

Hi , Just change the tag prefix because even I faced a lot of trouble because tag prefix . I used to get red underlines in my aspx page for all the tags whereever I was refering the ajax server controls . Better option will be to include the  directive in the webconfig file .


Tuesday, August 12, 2008 8:32 AM

Hi,

Hi have now changed the tagprefix as below and added the relevant lines into the web.config file. 

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>

 But still get the error.

Parser Error

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:

[No relevant source lines]

Source File: none **   Line:** 0

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

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

As we are hosting the system i do not have a web config file within the project as the web.config file is in the root of the folder.  Will this somehow make a difference?

 

Thanks for your continuing help.

 

Jon


Tuesday, August 12, 2008 9:18 AM

Pawan,

 I do not get any error when i use the Ajax controls on my C:/ drive and launch the systen through Visual Studio. Do we have to specfiy anything to enable AJAX controls on our web server?

 

Cheers,

Jon


Tuesday, August 12, 2008 2:50 PM

Hi Jon,

I am getting the same error and was wondering if this worked out for you.

Thanks,

Janis 

 


Wednesday, August 13, 2008 3:49 AM

No it this hasn't worked for me.  Are you also trying to run your system through Visual Studio or host it via a web server?

 

Cheers,

Jon


Wednesday, August 13, 2008 8:24 AM

Thanks for this Janis.  Will do.

I think it seems to be whenever we are on a shared drrive.  I think it has a lot to do with permissions.

I get the same error.  Let me know how you get on.

Cheers,

Jon


Thursday, August 28, 2008 1:46 PM

Whatever shared drive you are on, launching through visual studio seems to be the issue. In my case I can't. You can either load it on a web server and launch it as a site or save it locally to the machine you are working on, on the shared drive and launch it that way. Loading it on a web server to show it seemed to take care of the problem for me. But i am still working on it locally to my machine. If not see it the tool kit is located on the program files in your c: drive. That was also a problem for me. I didn't have it saved in the proper location. http://www.asp.net/learn/ajax-videos/ this video is where I was when I noticed that I had it saved in the wrong place.


Friday, August 29, 2008 3:50 AM

The only video's i can see are ones for the actual ajax controls.

 Which video did you watch to solve your issue?

 Cheers,

Jon


Monday, January 19, 2009 10:06 PM

I was having the same issue.

 I finally realized I was modifing the webconfig file and pushing it to the webserver, but I hadn't uploaded the 'AjaxToolkitControl.dll' in the bin file.  As soon as I did that the page loaded just fine.


Friday, September 2, 2011 3:27 AM

Hello.

See your Visual studio version if its 3.5 then install ajaxtoolkit35 from codeplex

if your visual studio is 4.0 then install ajax toolkit dll 4

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %> 

use this at top of the page

Thanks

Manoj upadhyay

onwner of http://www.mantul.com


Tuesday, September 25, 2012 8:35 AM

Please remove this line

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>

I am facing the same error.  If you maintain this line, it will add another problem to he existing one.