Jignesh Pankhania - J12
Jignesh Pankhania - J12

Reputation: 3147

When i run asp.net web page using RadGrid telerik control on server side it generate Error?

When i upload my web page on server and run that PAGE with RADGrid telerik control page it generate error like this

'~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadStyleSheetManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadStyleSheetManager

Upvotes: 2

Views: 3646

Answers (3)

Jason Dias
Jason Dias

Reputation: 771

I came across this issue while deploying to IIS 7.

You could set the Managed pipeline mode from Integrated to Classic. This indeed solves the problem with behaving IIS 7.5 as old 6.0 (with handler registered in old web.config node), but I wasn’t convinced that to use Telerik’s controls, I should use old type of pipeline.

Our old web.config file registered Telerik’s handler only in old section for IIS 6 (and that sufficed for cassini and IIS 6.0) and not in new section.

So I had to add this piece of xml to web.config :

<system.webServer>
    <handlers>
        <add name="Telerik.Web.UI.WebResource"  path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" />
    </handlers>
</system.webServer>

Apart from this you need to have

  1. Telerik.Web.UI.dll in bin folder

<httpHandlers>
      <add verb="*" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false"/>
</httpHandlers>

Registered in <system.web>

Upvotes: 0

KreepN
KreepN

Reputation: 8598

Simply add a RadStyleSheetManager to the page with the Radgrid on it. Click on the extended options pane and click the register button (in orange seen below):

enter image description here

It will add this line:

<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>

under then httpHandlers section in your web.config for you.

Upvotes: 4

Tim
Tim

Reputation: 28530

Does it run fine on your local box before uploading to the server? As the error message says, make sure its in your web.config file.

Also, based on this thread, it appears you need to register it in the system.webServer section as well:

<system.webServer>
  <validation validateIntegratedModeConfiguration="false" />
  <modules>
    <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" preCondition="managedHandler" />
  </modules>
  <handlers>
    <remove name="WebServiceHandlerFactory-Integrated" />
    <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
    <add name="Telerik.RadUploadProgressHandler.ashx_*" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode,runtimeVersionv2.0" />
  </handlers>
  <urlCompression doDynamicCompression="false" />
</system.webServer>

Note that I've never used this control, so there may be more that needs to be done.

Upvotes: 0

Related Questions