Custom Theme not applied when Web Site in Release mode

7 posts, 0 answers
  1. Tony
    Tony avatar
    13 posts
    Member since:
    Dec 2011

    Posted 10 Jan 2013 Link to this post

    I have setup the web.config to use my custom theme:

    <appSettings>
        <add key="Telerik.EnableEmbeddedSkins" value="false" />
        <add key="Telerik.Skin" value="Portal" />
      </appSettings>

    This works when I have:
    <compilation debug="false" 

    When I set debug="true" I get 404 errors for the custom images etc I am using on the RadGrid, e.g.:

    GET /NotFound?aspxerrorpath=/PortalDev/Content/Grid/sprite.gif HTTP/1.1  <-- missing the path to Portal theme

    The path used when debug is false (and this works) is: "PortalDev/Content/themes/Portal/Grid/sprite.gif"

    What setting do I need to use to get this to work?

    Thanks
    Tony
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 15 Jan 2013 Link to this post

    Hello Tony,

    If your problem is specifically 404 error, please see this blog post for troubleshooting info. If the advice there does not help, can you provide us with FiddlerCap logs, so we can troubleshoot at least your case?

    All the best,
    Pavlina
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tony
    Tony avatar
    13 posts
    Member since:
    Dec 2011

    Posted 28 Aug 2014 Link to this post

    using chrome dev tools I can see the initiator is http://localhost:61065/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3afa6755fd-da1a-49d3-9eb4-1e473e780ecd%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen-US%3a6915a8c2-c063-435a-ab31-d2d2285652a6%3a16e4e7cd%3af7645509%3a22a6274a

    from fiddler I get this:

    when debug=false it fails as the path does not include the theme, e.g. http://localhost:61065/Content/Grid/sprite.gif HTTP/1.1

    when debug=true the path is http://localhost:61065/Content/themes/Portal/Grid/sprite.gif and all is ok.

    in the web.config I have the following Telerik settings:
    <add key="Telerik.Web.UI.RenderMode" value="classic" />
    <add key="Telerik.EnableEmbeddedSkins" value="false" />
    <add key="Telerik.ScriptManager.EnableEmbeddedjQuery" value="false" />
    <add key="Telerik.Skin" value="Portal" />

    Any ideas?








  5. Tony
    Tony avatar
    13 posts
    Member since:
    Dec 2011

    Posted 28 Aug 2014 in reply to Pavlina Link to this post

    sorry so late to reply on this but I'm still looking for a solution:

    some more info...
    using chrome dev tools I can see the initiator is http://localhost:61065/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3afa6755fd-da1a-49d3-9eb4-1e473e780ecd%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen-US%3a6915a8c2-c063-435a-ab31-d2d2285652a6%3a16e4e7cd%3af7645509%3a22a6274a

    from fiddler I get this:

    when debug=false it fails as the path does not include the theme, e.g. http://localhost:61065/Content/Grid/sprite.gif HTTP/1.1

    when debug=true the path is http://localhost:61065/Content/themes/Portal/Grid/sprite.gif and all is ok. 

    in the web.config I have the following Telerik settings:
    <add key="Telerik.Web.UI.RenderMode" value="classic" />
    <add key="Telerik.EnableEmbeddedSkins" value="false" />
    <add key="Telerik.ScriptManager.EnableEmbeddedjQuery" value="false" />
    <add key="Telerik.Skin" value="Portal" />

    Any ideas?
  6. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 01 Sep 2014 Link to this post

    Hi,

    I assume that you had already revised the following article, describing the cause and the solutions for such problems:
    http://www.telerik.com/forums/telerik-web-ui-webresource-axd-unhandled-exception
    If you are not, please try the provided solutions and let us know the behavior.


    You can also check the following article in the documentation:
    http://www.telerik.com/help/aspnet-ajax/web-resources-troubleshooting.html 

    Another thing you can try is the script CDN we offer: http://www.telerik.com/help/aspnet-ajax/scriptmanager-cdn-support.html so that the scripts are not loaded from your own server, in case the problem stems from the webresource requests.

    If you are using RadScriptManager you can try disabling the script combining by setting the EnableScriptCombine property to false and see if it makes any difference.

    In addition, please refer to this forum thread, where a similar issue is observed and a solution for the problem is found.

    Regards, Pavlina
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  7. Tony
    Tony avatar
    13 posts
    Member since:
    Dec 2011

    Posted 02 Sep 2014 in reply to Pavlina Link to this post

    Hi Pavlina

    None of your suggestions are having any effect on the path to the theme when debug=false.

    i.e. the Request header is GET /Content/Grid/sprite.gif  - this is the wrong path

    but when I switch to debug="true" the Request header is altered to GET /Content/themes/Portal/Grid/sprite.gif and all is ok.


    Any other ideas?

    Thanks
    Tony





  8. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 05 Sep 2014 Link to this post

    Hello,

    May I ask you to isolate the problem in a sample runnable project where the custom theme is applied. This would allow us to replicate the described problem with debug="true" locally and provide a proper solution for your case. You should open a support ticket in order to be able to attach the project.

    Regards,
    Pavlina
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017