More in this section
Forums / Sitefinity SDK / Server Control Embedded Resources on live server

Server Control Embedded Resources on live server

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. John Tolar
    John Tolar avatar
    87 posts
    07 May 2003
    21 Jan 2011
    Link to this post
    I have created a server control that embeds the images and css into the resource file. I have made sure that the following is true:

    resources are marked as embedded resource
    I have included them in the assemblyinfo.cs 
    I have put the <%= Webresource("Namespace.Resource.path")%> reference into the css
    I have included a ResourceLinks control to embed the css in the page
    I have tried both UseEmbeddedThemes set to true and false

    On localhost, It resolves resources properly. The control works as expected in all aspects.  When I move it to production, It is not resolving the resources into the WebResource.axd url as expected, but instead uses the namespace path specified in the css. 

    Any thoughts on this? I have looked at it too long. I hate when my developers tell me "Well, it works on my machine".


  2. Vlad
    Vlad avatar
    498 posts
    19 Jun 2017
    26 Jan 2011
    Link to this post
    Hi John Tolar,

    You have to set Static property of the Resource file to true:
    Copy Code
    <sitefinity:ResourceLinks runat="server">
        <sitefinity:ResourceFile Name="SocialWidgetsContrib.Resources.SocialWidgetsContrib.css" AssemblyInfo="NewsRotator.Rotator, NewsRotator" Static="true" />

    Static resources will not be pulled from the theme folder, but rather a full URL for external or full resource name for embedded resources should be used.

    Kind regards,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered