关于Windows azure从github上部署项目

自己做了一个闪存解析的webapi,今天尝试了一下加一个HelpPage,本地访问正常,但是在azure上就报错。

项目是不熟在WindowsAzure上的,项目自动同步github上的项目。github 地址 https://github.com/grj1046/IngService

使用Install-Package Microsoft.AspNet.WebApi.HelpPage 安装,安装完成后本地反问一切ok。但是访问 http://ingservice.azurewebsites.net/api/Ing/All 就报错,改为debug模式,报错如下。

Could not find a part of the path 'D:\home\site\wwwroot\App_Data\XmlDocument.xml'.

XmlDocument.xml文件在github上是有的,但是同步到Azure之后,App_Data文件夹也消失了。因为google上不去,直接去stackoverflow上搜了下。http://stackoverflow.com/questions/23681534/asp-net-webapi-publish-xml-files-not-copy/23756143#23756143

使用了第二个方法

2) Go to your project property --> select "Package/Publish Web" option --> items to displays --> select "all files in this project" from dropdown

使用ftp登录上去后查看了下,仍是没有App_Data文件夹,无奈,使用了第一种方法,添加将XMLDocument.xml添加到项目中,问题解决。

https://github.com/grj1046/IngService/commit/b762588ada2d2bb0015d5f075b47df679a8884f5

posted @ 2015-03-28 17:06  nil  阅读(460)  评论(0编辑  收藏  举报