【发布时间】:2015-11-03 03:15:35
【问题描述】:
我正在使用 azure 部署我的新 Web API,我是在 IIS 和 azure 上部署的新手。
我已在 azure 上将我的 Web API 添加为 Web 应用程序,它运行良好,直到我为每个 API 的功能添加了文档。添加描述后,我从 HelpPageConfig.cs 取消注释下面的行。
config.SetDocumentationProvider(new XmlDocumentationProvider(HttpContext.Current.Server.MapPath("~/App_Data/XmlDocument.xml")));
它在本地运行,我可以看到所有描述,但是当我在 azure 上发布它时,我收到错误提示,
Could not find a part of the path 'D:\home\site\wwwroot\App_Data\XmlDocument.xml'.
网站网址:http://mejodo.azurewebsites.net/
我需要改变路径吗?
文件已在我的系统中的 D:\home\site\wwwroot\App_Data 目录中创建。
我需要做哪些更改才能使其正常工作?
【问题讨论】:
标签: asp.net asp.net-mvc-4 asp.net-web-api azure-web-app-service asp.net-web-api-helppages