asmx webservice on IIS6 gives a 404 error - c#

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>

Related

"Telerik" could not be found in global namespace

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

Telerik.Web.UI.WebResource.axd 500 (Internal Server Error)

I am trying to deploy a C# .NET 4.5 application on IIS7 that uses Telerik UI. For some reason I am getting the following error when I navigate to my login page
GET http://localhost/dev/3pt_upgrade/portal/Automation_Framework/Telerik.Web.UI.WebResource.axd 500 (Internal Server Error)
I have tried everything on The Telerik Web Resources Troubleshooting guide
In my Web.config I have
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true">
...
</modules>
<handlers>
<add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<add name="Telerik.Web.UI.WebResource" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2013.3.1114.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
</handlers>
</system.webServer>
Any insight on the matter would be truly appreciated.
Use Fiddler to see what error was thrown inside the .axd call. In my case was a bad path to telerik.common.css file.

Facing an error on treeview control when code is transferred from one machine to another

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>

LINQ not in namespace

I have a web project in visual studio 2012 that I am working with over an ftp connection. I am getting the error that the Linq does not exist in the namespace System.Data and Linq does not exist in the namespace System. Visual studio displays an error and will not give code suggestions, however, the code runs fine on the IIS server.
My web.config contents are below.
I have read over the many questions and articles on this problem and was still unable to find a working solution.
<system.web>
<compilation debug="true" strict="false" explicit="true" urlLinePragmas="true">
<assemblies>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.Services.Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Services.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Data.Linq"/>
<add namespace="System.Linq"/>
<add namespace="System.Xml.Linq"/>
</namespaces>
</pages>
Try to manually add the reference to System.Data.Linq in your project.This should hopefully resolve your problem.
Project -> References -> Add reference -> System.Data.Linq
This comes a little late, but in the interest of "giving back"..... When I had this issue (VS 2010 running website through IIS), I had to change the target framework to something else, save the changes, and then change it back to v 4.0 (the original my project was built with). (Right-click Project -> property pages -> Build -> "Target Framework"). That cleared up the issue. Not sure how or why. =)
In Visual Studio, check that the project is targetted to a version of the .NET framework that includes Linq. Right click on the project, then look for the Target Framework option. If this is set to v2, everything else that VS tells you will be based on v2 - the available assemblies, the versions of the base class library assemblies, etc.
This happens to me when I upgrade from VisualStudio 2013 to 2015.
I encounter to these errors while the Project build doesnot comes to the end and stops after some warnings. I resolve these warnings, and when I solve the last warning:
Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=11.0.0.0, . . .
the error:
the Linq does not exist in the namespace System
get solved.

What is an .axd file?

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.

Categories