ASP.NET - Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies.

Asked By vanchi nathan on 14-May-10 06:32 AM
hi all,

First i have installed the ASPAJAXExtSetup into my system for using ajax because i am using .net 2.0 version.
Then i have create the Ajax Enabled website. in my index.aspx page i am using ajax auto complete extender in my page. 

in server the following error will occured. 
 

Server Error in '/' Application.

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:

Line 1:  <%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %>
Line 2:  
Line 3: <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>Line 4:  
Line 5:  

Source File: /beta/fastfindpages1/Index.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].

anybody help me.

Thanks in advance
Sakshi a replied to vanchi nathan on 14-May-10 06:37 AM

This will solve,

1. create an application on the directory of the AJAX project in IIS
You can do that by following the steps:

1. Control Panel > Administrative Tools > Internet Information Services
2. Expand the server > Web Sites > Default Web Sites (or whatever location the site is)
3. Right-click the folder and choose "Properties" from the context menu
4. On the default "Directory" tab, there's a button called "Create". This will create an application in the folder.

Jinal Desai - LIVE replied to vanchi nathan on 14-May-10 06:37 AM
You need to do two thing to resolve it.

1. Registered the assembly by using the following code:

<b><%@ Register Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit" TagPrefix="ajaxControl" %></b>

You have already done the first step.

2. Copy the AjaxControlToolkit.dll into the /bin folder of the web site application.


Hope this will help!
Sakshi a replied to vanchi nathan on 14-May-10 06:39 AM
along with the above reply i gave , see my earlier post just before this question ,

you need to ensure,


1. you need to add references to these dlls,

System.Web.Extensions.dll
System.Web.Extensions.Design.dll

2. you need to upload the bin folder along with
AjaxControlToolkit.dll

3. in your code you must have
ScriptManager included
Web Star replied to vanchi nathan on 14-May-10 06:40 AM
u need to add referance of AjaxControlToolkit assembly in your project than u will be use auto complete extender control .
also try this

1. Install the latest Asp.NET Ajax

2.Open my web.config in my production server and replace this line

<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

by

 <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

It's the same thing but the PublicKeyToken is in capitals....

vanchi nathan replied to Sakshi a on 14-May-10 07:22 AM
pls let me know briefly i could not understand. pls
Mash B replied to vanchi nathan on 14-May-10 09:25 AM
One case might be if u have placed ur AjaxControlToolkit.dll in bin folder, then place it in another folder in project  and then reference it.
Becouse if u place the AjaxControlToolkit.dll in bin folder, each time when u build the solution it will clean the bin directory and create new dll , that time u might loose the AjaxControlToolkit.dll.

Just try and check.
Sakshi a replied to vanchi nathan on 14-May-10 11:48 AM
1. you need to add references to these dlls,in you web application

System.Web.Extensions.dll
System.Web.Extensions.Design.dll

also add reference to the ajaxcontroltoolkit

2. you need to upload the bin folder along with
AjaxControlToolkit.dll


3. in your code you must have
ScriptManager included