Server Control Embedded Resources on live server
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".
Thanks,
JT
Hi John Tolar,
You have to set Static property of the Resource file to true:
<
sitefinity:ResourceLinks
runat
=
"server"
>
<
sitefinity:ResourceFile
Name
=
"SocialWidgetsContrib.Resources.SocialWidgetsContrib.css"
AssemblyInfo
=
"NewsRotator.Rotator, NewsRotator"
Static
=
"true"
/>
</
sitefinity:ResourceLinks
>