I recently started to create a project on AppHarbor just to try it out. And I've run into a small problem. I've created small files containing jQuery-templates which I've named .tmpl-files and placed inside "~/Templates/". To get the content of one of these files I use HttpRequest.Current.Server.MapPath(path);
, and File.Open
, and this all just works perfectly on my local machine, however, on AppHarbor I get that the file does not exist. Is there a workaround to make this work? Do I need to mark the files in some way, or is there something I can put inside my Web.config/project-settings that can make this work?
Be sure to mark the files as Content
(right click file in Solution Explorer, set Build Action
to Content
). If you don't do this, the file will not be included in the msbuild output and thus not deployed by AppHarbor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With