Html.Telerik().StyleSheetRegistrar() output file generating 404 message on asset.axd
Asked Answered
O

1

5

I'm using the Telerik controls form MVC and they work great in my work/home dev environments, and in the work prod environment, but when I tried to deploy to my home prod environment (IIS7) I get a problem.

I've added the axd mime type, but wan't sure what else to do. I read a post suggesting adding a handler, but wasn't sure if I'm setting that wrong or I'm just looking in the wrong direciton.

if you're on IIS7 make sure you add the handler to the <system.webServer><handlers> section:

<add name="MyName" path="MyName.axd" verb="*" type="NameSpace.Class, Assembly" /> 

I added: <add name="ScriptRegistrar" path="Access.axd" verb="*" type="Telerik.Web.Mvc.UI.ScriptRegistrar, Version=v2.0.50727" />

http://localhost:1000/asset.axd?id=sQAAAB-LCAAAAAAABADsvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee--997o7nU4n99__P1xmZAFs9s5K2smeIYCqyB8_fnwfPyJ-8UfT9qNHH7X5u_butGk-Gn10SX_u7ezujHfH93Ye0gfTjx619TqnX2YfPbr36f3RR_Tze7_4oxU1PKmWbb5s775ur8scb5_zV9VHj3ZGHy2pwbRaLKrlGKB_yYi_2JUv2rzM6-LtuN9gL2xwWTRtJt9__5d8_5f8PwEAAP__qtxwmrEAAAA%3d

Obrian answered 22/8, 2010 at 18:41 Comment(0)
M
9

To enable web resource combining with the Telerik Extensions you need to register the WebAssetHttpHandler in your webconfig:

IIS 7

<add name="AssetHandler" preCondition="integratedMode" verb="GET,HEAD" path="asset.axd" type="Telerik.Web.Mvc.WebAssetHttpHandler, Telerik.Web.Mvc"/>

IIS 6

<add verb="GET,HEAD" path="asset.axd" validate="false" type="Telerik.Web.Mvc.WebAssetHttpHandler, Telerik.Web.Mvc"/>

This handler enables you to use the Combine, Compress, and Cache features of the Script and StyleSheet Registrars. You can learn more and see additional config details in the Telerik online docs:

http://www.telerik.com/help/aspnet-mvc/web-assets-working-with-javascript-web-assets.html

Moyers answered 1/9, 2010 at 7:2 Comment(2)
To get IIS 7 to work the tag needs to be in the <system.webServer><handlers> sections like this: <system.webServer> <handlers> <add name="AssetHandler" preCondition="integratedMode" verb="GET,HEAD" path="asset.axd" type="Telerik.Web.Mvc.WebAssetHttpHandler, Telerik.Web.Mvc"/> </handlers> </system.webServer>Rusk
This totally saved my bacon; upboat for you!Di

© 2022 - 2024 — McMap. All rights reserved.