Last post Jul 02, 2009 03:02 AM by mschprv
Jul 01, 2009 03:58 PM|mschprv|LINK
Hi, I am confronted to a nasty problem: In a number of pages, I have included an external js script to generate templated data. The script relies on the
When the page is rendered by the hosting server, Firebug issues the exception error: There is no template at ... I noticed that the template is found when the erb-style delimiters <%= %> are omitted. It seems that ASP.NET refuses to service the request
whenever these control tags are embedded in the template script.
Question: How can ASP.NET be fooled to render the script (page declarations, ..) ?
PS: My initial design was based on
John Resig's micro-template. Unfortunately, I had to give it up since it does not pass XHMTL validation.
Jul 01, 2009 11:34 PM|RickNZ|LINK
What file extension are you using for the content with embedded <%= %> control tags? If it's not .aspx, then that would explain why the tags aren't being processed. You can either change it to aspx, possibly setting the MIME type yourself if needed, or
assign the extension you're using to the ASP.NET HttpHandler.
Jul 02, 2009 02:32 AM|mschprv|LINK
Thanks RickNZ. Sorry, the wording in my initial post was partially inaccurate: the corrected statement is that the template script is not found even when the control tags are removed.
The error reported by Firebug is of type HTTP 404 - File not found error. I did some research. and stumbled across this article by MS:
Troubleshooting HTTP 404 errors . As you pointed out , the problem may be related to a missing MIME extension.
Question: How can I assign the extension to the HttpHandler programmatically? TIA.
Jul 02, 2009 03:02 AM|mschprv|LINK
Problem solved! I was able to set the MIME extension (ie type: text/html; extension: .ejs) in the IIS administration panel inside my ISP account. Thanks again.