【发布时间】:2014-05-14 00:09:17
【问题描述】:
我在我的测试服务器上部署了一个 Umbraco 站点。我正在尝试使用 Umbraco API 将内容从 Umbraco 站点提取到本地服务器上的本地 ASP.Net webforms 网站。
我不知道在哪里指定 Umbraco web api 端点,因此 API 会知道在测试服务器上而不是我的本地服务器上查找服务。
是否可以配置 Umbraco Web api 端点,如果可以,如何配置?
protected void Page_Load(object sender, EventArgs e)
{
int documentID = 1077;
var contentService = ApplicationContext.Current.Services.ContentService; // NullReferenceException on this line, because the Current Application Context is null
contentService.GetById(documentID);
}
【问题讨论】:
标签: configuration umbraco asp.net-web-api