I am having trouble getting my AJAX control tool kit working in asp.net. The website runs fine when I run it using the localhost/website.aspx address however when I attempt to access the website via the net I get the error below. Any Suggestions?
Parser Error Message: Could not load file or assembly
'AjaxControlToolkit' or one of its dependencies. The system cannot
find the file specified.
Line 1: <%# Page Language="VB" AutoEventWireup="false"
CodeFile="Submit_Employee_Info.aspx.vb" Inherits="_Default"
MaintainScrollPositionOnPostback="true" %>
Line 3: <%# Register Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit" TagPrefix="asp" %>
Source File: /RequestForm/Submit_Employee_Info.aspx Line: 3
Sorry not much reputations so posting as answer instead of comments. Do you have ajax toolkit dll referenced in your project. To confirm, check your bin/debug director.
In your local solution, expand the references folder in the web application, and find the AjaxControlToolkit.dll.
Right click, Properties, and check the path to where the DLL is referenced
If it's referenced to a folder outside of your project, you will need to include this in the project.
You have a couple of choices...
Copy DLL into a 3rdPartyLibs folder in the solution, and change the reference to point here
Use Nuget to download the file into the solution, the only issue here is that the version may be incorrect, so option 1 here might be best in your scenario.
Related
We have added third party (DropdownCheckBoxes) dll reference in our SharePoint web part application.
On the user control, registered this assembly as
<%# Register Assembly="DropDownCheckBoxes" Namespace="Saplin.Controls" TagPrefix="asp" %>
When we run it on browser, it giving us error as --
Could not load file or assembly 'DropDownCheckBoxes' or one of its dependencies. The system cannot find the file specified.
Can you please guide what needs to be done for this?
Thank You!
I'd like clarification of what seems to be a contradiction in MSDN documentation.
MSDN makes very clear the distinction between a "web site" and a "web application." For example, it says you should use an "application" instead of a "site" if...
You want to avoid putting source code on a production server.
Ok, sounds good, but when you create an ASP.NET MVC "app" or a WCF service "app", the first thing you get is a description file with a CodeBehind that specifies what source code to reference. Examples:
For ASP.NET MVC
<%# Application Codebehind="Global.asax.cs" Language="C#" Inherits="Sample.MvcApplication" %>
For a WCF service app
<%# ServiceHost CodeBehind="MyService.svc.cs" Language="C#" Service="Sample.MyService" %>
In both these "app" examples, the "CodeBehind" assumes you have placed source code on your production server. In short, what you receive from a Visual Studio "App" or "project" template basically contradicts the claim made by MSDN documentation.
What makes this more strange is that, at least in some caes, this doesn't need to be this way. For example, another valid way for the WCF service description file to be generated is like this:
<%# ServiceHost Language="C#" Debug="true" Service="Sample.AccountService" %>
<%# Assembly Name="Sample.AccountService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" %>
With the "Assembly" directive, it is not necessary to specify a CodeBehind target. If a purpose of a WCF app (in contrast with a WCF site, which is also a Visual Studio option) is to have no source code on a production server, why then is the service definition file not generated as shown in the last sample above?
What is the rationale that allows this apparent contradiction?
You want to avoid putting source code on a production server.
This is referring to the ability use non-compiled code. With a website, you have the ability to copy your aspx.cs or aspx.vb files (in clear text) along the aspx files and have them run. You can also modify them in clear text because they are not compiled.
A web application differs because must be compiled, the source code exists in DLLs.
I am working on sharepoint 2010. I have created a simple visual web part which contain one text box and I have added calendarextender to it. I have added ajaxcontroltoolkit.dll as reference. But when I deploy to sharepoint site then it gives me following error.
"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 3: <%# Register Assembly="AjaxControlToolkit"> Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
Source File:
/_CONTROLTEMPLATES/VWP_Ajax/VisualWebPart1/VisualWebPart1UserControl.ascx Line: 9
Any ideas where Im going wrong?
Is the AjaxControlToolkit.dll in the bin directory after you deploy the site?
The assembly (AjaxControlToolkit.dll) needs to be deployed to the Global Assembly Cache (GAC) or put in the \BIN folder of the SharePoint site's folder.
This definitely worked for me with SharePoint 2010 ...
Error Code:
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxControlToolkit"%>
Working Code:
<%# Register Assembly="AjaxControlToolkit, Version=3.5.60501.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" Namespace="AjaxControlToolkit" TagPrefix="ajaxControlToolkit"%>
Another possible solution is to explicitly set the full assembly name in your register command. I found that I had to update my code to include this to get it to work properly:
<%# Register Assembly="AjaxControlToolkit, Version=3.0.30930.28736, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
For third-party controls like this, it's worth being as specific as possible to avoid any errors if versions change.
Even you tried above and it wont work, Just add another Page/MasterPage and add ToolKitScriptManager on it.It will create Bin Folder at required path. If still there is Error check the Register Assembly line on newly added page/MasterPage and copy that Register Assembly line to other pages wherever your error is.
i have installed AJAXcontrolsToolkit with my visual studio and placed "Combobox" Ajaxcontrol controls in my webpage . when i am compiling the code getting below error
"Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified"
Have you added the required assembly to the references of your project?
The above post was very useful
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
I was using the above code , i replaced the code as below and now working
<%# Register Assembly="AjaxControlToolkit, Version=3.5.40412.0, Culture=neutral, PublicKeyToken=****" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
Thanks for your post
I use File-Zilla to upload my files to the web server. I found that my reference files (AjaxControlToolkit.dll and AjaxControlToolkit.pdb) in the bin folder on the web server had not been completely transferred. so I deleted them and I uploaded new ones from the development site directly into the bin folder of the web server.
And Voila! Everything just fell into place like magic.
The application not load because it not find or not is compatible, try to do download from at nuget Install-Package AjaxControlToolkit -version x.x, or in site.
I am trying to convert a website to a web application project.
while doing that i got some error say:
"Generation of designer file failed: Unknown server tag 'cc1:Rating'"
In my few pages i am using Ajaxcontrol toolkit, so i have registered the tag in the page.
<%# Register TagPrefix="cc1" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" %>
when i try to convert this page, its giving me the error. So what could be the work around to fix this issue????
Try this out.
Configure your tag prefix in web.config if you have many pages that are using the toolkit. It's fine even if you keep it in the page itself.
Make sure you have a reference to the AjaxControlToolkit in your application and change the assembly name to that of the web application that contains the controls just during the conversion:
<add tagPrefix="cc1" namespace="AjaxControlToolkit" assembly="WebApplicationHavingTheControlsASsemblyName"/>