Telerik RadControls, controlling where ScriptResource.axd files are generated when EnableEmbeddedScripts is true

StackOverflow https://stackoverflow.com/questions/19036889

Question

In Telerik RadControls, how do you control where the ScriptResource.axd files are generated when EnableEmbeddedScripts is true?

By default, it renders them in the root of my web app and

<add key="Telerik.WebControls.RadControlsDir"
        value="~/Resources/RadControls/"/>

Doesn't appear to work, EnableEmbeddedScripts is not false.

Était-ce utile?

La solution 2

I don't know if this answer can help you, but I found this information - most probably you already know it but I'm pasting it here anyway, who knows?

It says that this preference is not working when you're using Visual Studio built-in web server (as most developers does) and NOT IIS.

"NOTE: The approaches suggested in this article will not work when you're using the built-in VS 2005 web server. They will only work when your site is running in IIS because the VS 2005 internal server does not support virtual directories. If you are testing locally (and not using IIS), you must have a copy of the RadControls folder in your web application."

The note has been taken from here and it's about VS2005:

http://www.telerik.com/support/kb/aspnet-ajax/general/changing-the-location-of-the-radcontrols-or-setting-scripts-folder.aspx


EDIT 1: moreover, it's working when the UseEmbeddedScripts property of the control is set to false, so it's not your case. Well, I hope it's useful anyway.


EDIT 2: I found another link that could help to better find a solution. As @cahmadzadeh said, those are Http Handlers and they're most probably managed outside Telerik:

http://forums.asp.net/t/1546423.aspx

Autres conseils

As described in the ScriptResourceHandler MSDN page, ScriptResourceHandler is merely a "class that processes all requests for embedded script files".

It generates output that you can see in browsers developement tool (ie: chrome) but the generated content itself is not stored on the server. Instead, resources used to generate this content output are compiled within the application (this is a the "build action : Embedded Resource" in files properties).

Additionnal note: the handler is usually defined by the following section in the Web.config file (although Telerik might use a custom handler for their files such as themes / javascript):

<httpHandlers>
  <add verb="GET,HEAD" path="ScriptResource.axd" 
    type="System.Web.Handlers.ScriptResourceHandler, 
    System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, 
    PublicKeyToken=31bf3856ad364e35" validate="false" />
</httpHandlers>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top