Hello Simon,
Sorry for the late response.
The issue mentioned in the thread is that WebResource.axd handler does not work properly after the web role is deployed on the cloud. To confirm whether WebResource.axd works or not, I created a simple project using the following steps:
1. Create a new azure service project with a ASP.NET web role.
2. Add a sample.css file to the web role and set the "Build Action" as "Embedded Resource".
3. Mark the css file as web resource by adding the following code (WebApplication1 is my web role project name) in AssemblyInfo.cs:
[assembly: WebResource("WebApplication1.sample.css", "text/css")]
4. Add an ASP.NET page Default.aspx to the web role and write the following code to access the css file through WebResource.axd handler:
protected void Page_Load(object sender, EventArgs e)
{
string url = Page.ClientScript.GetWebResourceUrl(typeof(Default), "WebApplication1.sample.css");
Response.Write(String.Format("<a href='{0}' target='_blank'>{0}</a>", url));
}
5. Debug the azure service project in compute emulator and click the link to ensure that WebResource.axd handler is working.
6. Deploy the project on cloud to see if it works. The result is that it is working fine. You can try my deployed service via
http://wenchaozengtest.cloudapp.net/ (just for temporary use).
If it does not work for Telerik controls for some reasons, a workaround you may consider is to run the web role in compute emulator then copy the file content by manually access the WebResource.axd handler to a new file in your project. And refer to these
new files from your pages. In this way, we can get the file content from the embed resource and store it as a solid file.
Thanks,
Wengchao Zeng
Please mark the replies as answers if they help or unmark if not.
If you have any feedback about my replies, please contact
msdnmg@microsoft.com.
Microsoft One Code Framework