开发者

Getting file-content on AppHarbor

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-file开发者_运维技巧s 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜