Currently I am working on a ASP.NET web form project which is using Telerik Ajax Version 2015.2.623.45, I have added Telerik.Web.UI.dll, Telerik.Web.Design.dll into my project reference, but it keeps giving me errors saying
The type or namespace name 'Telerik' could not be found in the global namespace (are you missing an assembly reference?)
Here's some info of my project if that may helps:
I am using .NET Framework 4, using Integrated Mode,
the dll's Aliases property is "global", and Copy Local property is True
and my web.config contains following parts:
<controls>
<add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
</controls>
...
...
<httpHandlers>
<add verb="*" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResourceSession, Telerik.Web.UI" validate="false"/>
<add verb="*" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI" validate="false"/>
<add verb="*" path="Telerik.Web.UI.DialogHandler.axd" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI" validate="false"/>
<add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" validate="false"/>
</httpHandlers>
...
...
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="Telerik.Web.UI.RadTextBox, Telerik.Web.UI, Version=2015.2.623.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
<add assembly="Telerik.Web.UI.RadAsyncUpload, Telerik.Web.UI, Version=2015.2.623.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
<add assembly="Telerik.Web.UI.RadAjaxManagerProxy, Telerik.Web.UI, Version=2015.2.623.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
<add assembly="Telerik.Web.UI.RadCodeBlock, Telerik.Web.UI, Version=2015.2.623.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
...
...
</assemblies>
</compilation>
...
...
<handlers>
<remove name="Telerik_Web_UI_WebResource_axd"/>
<remove name="Telerik_Web_UI_SpellCheckHandler_axd"/>
<remove name="Telerik_Web_UI_DialogHandler_aspx"/>
<remove name="Telerik_RadUploadProgressHandler_ashx"/>
<add name="Telerik.Web.UI.WebResource.axd" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResourceSession, Telerik.Web.UI" preCondition="integratedMode"/>
<add name="Telerik.Web.UI.SpellCheckHandler.axd" path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI" preCondition="integratedMode"/>
<add name="Telerik.Web.UI.DialogHandler.axd" path="Telerik.Web.UI.DialogHandler.axd" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI" preCondition="integratedMode"/>
<add name="Telerik.RadUploadProgressHandler.ashx" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode"/>
</handlers>
I have Googled a lot and tried all method on Telerik Forum, but it does not help...Can someone help me and tell me what am I missing, and how can I reference Telerik.*.dll correctly?
You can try removing the references and adding them again. In the properties of the references, "Copy Local" should be set to true (but I think this is the default). Also, make sure you're adding them to the correct project in your solution! (This tripped me up once.)
Finally, make sure the DLLs you are referencing are built against the same version of the .NET Framework your project is targeting. If they're not, you'll get something like the following warning when building:
Warning 1576 The primary reference "Telerik.Web.Design, Version=2014.2.724.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4, processorArchitecture=MSIL" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
Another way is to simply add the missing the references, this might give you an indication of missing dll files missing dlls. Your telerik dlls should be under C:\ Programe Files(x86)\Progress
Did you try to use the Telerik ASP.NET AJAX VS Extensions. To convert your project using the Telerik ASP.NET AJAX VS Extensions follow these steps:
Select your web site project in Visual Studio Solution Explorer.
In the Visual Studio menu select Telerik -> UI for ASP.NET AJAX -> Convert to Telerik Web Site
Use the configuration wizard to convert your web site. You can find more information about Configure wizard options in our documentation at http://docs.telerik.com/devtools/aspnet-ajax/general-information/integration-with-visual-studio/visual-studio-extensions/creation-and-configuration-wizard.
If you still prefer to manually manage the Telerik resources in you project you can take a look at http://docs.telerik.com/devtools/aspnet-ajax/general-information/adding-the-telerik-controls-to-your-project.
first of all check your target Framework of your current project
then check your assembly version of telerik control in 2 part : one in toolbox panel and the other one in project reference section,
all of them must be the same.
for detail of version assembly and Framework check out the link :
https://docs.telerik.com/devtools/aspnet-ajax/installation/included-assemblies
Related
I'm stuck with deploying a simple webservice to an IIS6 on a W2K3 server and hope someone can help me..
The server has Microsoft .Net Framework 3.5 SP1 installed.
The webapplication has the default 3.5 web.config
As soon as I xcopy a simple webservice (just an .asmx file without codebehind) to the server I get the following error:
Server Error in '/vd' Application.
The resource cannot be found. Description: HTTP 404. The resource you
are looking for (or one of its dependencies) could have been removed,
had its name changed, or is temporarily unavailable. Please review
the following URL and make sure that it is spelled correctly.
Requested URL: /vd/ws/EmptyService.asmx
-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.3053;
ASP.NET Version:2.0.50727.3053
When I copy other files (html, aspx, ..) to that folder they render just fine.
So I have a feeling it's an issue with the asmx mapping but don't know where and what to correct?
Hoping this is familiar to some of you..
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpHandlers>
Ah, so stupid of me..
Turned out I had a bad section in my web.config, I had been so dumb of specifying my own wsdlHelpGenerator for branding purposes and then forgot to copy that page over... It's exactly as the error said... "the resource you are looking for (or one of its dependencies) could have been removed ..."
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
<wsdlHelpGenerator href="GLSWsdlHelpGenerator.aspx"/>
</webServices>
I am facing an error on the tree view control. Image is shown below.
What could be the potential reasons for it. I have transferred published code from one PC to another. The target machine is having windows 2008 server.
Everything is fine except the treeview control:
What could be the potential reasons for it?
Update
Here is an excerpt from my web.config
<system.webServer>
<validation ntegratedModeConfiguration="false" />
<handlers>
<add name="ReportViewerWebControl"
path="Reserved.ReportViewerWebControl.axd" verb=""
type="Microsoft.Reporting.WebForms.HttpHandler"
resourceType="Unspecified"
requireAccess="Script"
preCondition="integratedMode" />
<add name="ReportViewerWebControlHandler"
preCondition="integratedMode"
verb=""
path="Reserved.ReportViewerWebControl.axd"
type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>
This happens when you transfer files from one server to another but miss out the mapping for axd files.
Many controls embed images inside dlls and retrive them using WebResource.axd.
A common cause is moving from one version of IIS to another.
In IIS6 you would map it as:
<httpHandlers>
<add verb=”Get” path=”WebResource.axd”
type=”System.Web.Handlers.AssemblyResourceLoader” />
</httpHandlers>
However in IIS7 you will need
<system.webServer>
<modules>
</modules>
<handlers>
<add name=”webresources” verb=”Get” path=”WebResource.axd”
type=”System.
Web.Handlers.AssemblyResourceLoader” />
</handlers>
</system.webServer>
What kind of purpose do .axd files serve?
I know that it is used in the ASP.Net AJAX Toolkit and its controls. I'd like to know more about it.
I tried Googling for it, but could not find getting basic information.
from Google
An .axd file is a HTTP Handler file. There are two types of .axd files.
ScriptResource.axd
WebResource.axd
These are files which are generated at runtime whenever you use ScriptManager in your Web app. This is being generated only once when you deploy it on the server.
Simply put the ScriptResource.AXD contains all of the clientside javascript routines for Ajax. Just because you include a scriptmanager that loads a script file it will never appear as a ScriptResource.AXD - instead it will be merely passed as the .js file you send if you reference a external script file. If you embed it in code then it may merely appear as part of the html as a tag and code but depending if you code according to how the ToolKit handles it - may or may not appear as as a ScriptResource.axd. ScriptResource.axd is only introduced with AJAX and you will never see it elsewhere
And ofcourse it is necessary
Those are not files (they don't exist on disk) - they are just names under which some HTTP handlers are registered.
Take a look at the web.config in .NET Framework's directory (e.g. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config):
<configuration>
<system.web>
<httpHandlers>
<add path="eurl.axd" verb="*" type="System.Web.HttpNotFoundHandler" validate="True" />
<add path="trace.axd" verb="*" type="System.Web.Handlers.TraceHandler" validate="True" />
<add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="True" />
<add verb="*" path="*_AppService.axd" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="False" />
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="False"/>
<add path="*.axd" verb="*" type="System.Web.HttpNotFoundHandler" validate="True" />
</httpHandlers>
</system.web>
<configuration>
You can register your own handlers with a whatever.axd name in your application's web.config. While you can bind your handlers to whatever names you like, .axd has the upside of working on IIS6 out of the box by default (IIS6 passes requests for *.axd to the ASP.NET runtime by default). Using an arbitrary path for the handler, like Document.pdf (or really anything except ASP.NET-specific extensions), requires more configuration work. In IIS7 in integrated pipeline mode this is no longer a problem, as all requests are processed by the ASP.NET stack.
An AXD file is a file used by ASP.NET applications for handling embedded resource requests. It contains instructions for retrieving embedded resources, such as images, JavaScript (.JS) files, and.CSS files. AXD files are used for injecting resources into the client-side webpage and access them on the server in a standard way.
I have a shared project where I store all of my custom EditTemplates and DisplayTemplates. This is a regular C# class library project with the views all tagged as embedded resources. The target framework of this project is ".Net Framework 4".
Inside the /Views/ folder I have included this web.config file so I get MVC 2 intellisense when working with the .aspx and .ascx files:
<?xml version="1.0"?>
<configuration>
<system.web>
<httpHandlers>
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
</httpHandlers>
<pages
validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<controls>
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
</configuration>
Normally I have no problems with this setup but once and while I get an error when I compile my views:
Error 3 Feature 'anonymous types'
cannot be used because it is not part
of the ISO-2 C# language
specification
for a template that looks like:
<%# Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%# Import Namespace="System.Web.Mvc.Html" %>
<%
string displayText = string.Empty;
if (Model != null)
{
if (DateTime.Parse(Model.ToString()) != DateTime.MinValue)
displayText = DateTime.Parse(Model.ToString()).ToShortDateString();
}
%>
<%= Html.TextBox("", displayText, new { #class = "date-box" })%>
Most of the time this error just goes away. I've learned to deal with it but right now its causing some issues. Any idea of what causes the "Error 3 Feature 'anonymous types' cannot be used because it is not part of the ISO-2 C# language specification" error and how I can fix this?
I've faced with this issue, and have spent a lot of time, while figured out that App.Config file with empty configuration section in it was root of the evil. Simply remove App.Config, and all will work fine.
Somehow your IDE experience is causing the 4.0 C# compiler to be limited to features allowed in the 2.0 version of the compiler. This can be done using the langversion switch. For example
csc /langversion:ISO-2 ...
Full Documentation: http://msdn.microsoft.com/en-us/library/f4ckecs0.aspx
I'm unfamiliar with how compilation works for Asp.Net MVC but somewhere in your project system you've asked to be limited to the 2.0 framework. My first guess would be to look at the project page of the project and make sure it's not targeting 2.0.
The solution for me was to change the project type
Unload the project
Edit project
Swap the project GUID for this
ProjectTypeGuids: {E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
(This is an MVC3 project)
For me this was ultimately caused by low disk space, presenting as a hailstorm of unusual and inexplicable random build errors.
We want to use Html.RenderAction in our MVC1.0 project. I have downloaded the Futures Microsoft.Web.Mvc dll from codeplex, copied it to the bin folder in our project, and added a reference to it.
However, when I try to use it in one of our views, Html.RenderAction is still not available.
It might be just a silly detail I'm missing, but I have no idea what else I have to do :(
P.S. I checked, and I can actually write "Microsoft.Web.Mvc.ViewExtensions.RenderAction" and Visual Studio autocompletes the code just fine, so it seems the dll is correctly included in the project.
You have to add it to the "namespaces" tag in web.config.
<system.web>
<pages>
<namespaces>
<add namespace="Microsoft.Web.Mvc"/>
</namespaces>
</pages>
</system.web>
RenderAction is part of the MvcFutures project.
Kindness,
Dan
You might need to modify your web.config:
<compilation debug="true">
<assemblies>
<add assembly="Microsoft.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
</assemblies>
</compilation>
<pages>
<namespaces>
<add namespace="Microsoft.Web.Mvc"/>
</namespaces>
</pages>