【发布时间】:2014-06-05 04:58:28
【问题描述】:
使用微风的Devcurry hottowelsignalr example 工作正常,直到我通过 nuget 将微风升级到 1.3.6。
chrome 中的 F12 显示它正在尝试从 http://localhost/api/breeze/Metadata 检索元数据,而之前它会使用
http://localhost/OnlineCollaborationWithSignalR/api/breeze/Metadata。这是呼叫的正确位置。似乎根目录中缺少应用程序的路径。即(OnlineCollaborationWithSignalR)
更新 注意到 1.3.1 的发行说明。并随后将路由改为
public static class BreezeWebApiConfig {
public static void RegisterBreezePreStart() {
GlobalConfiguration.Configuration.Routes.MapHttpRoute(
name: "BreezeApi",
routeTemplate: "breeze/{controller}/{action}"
);
}
}
和 app/viewmodels/home.js 到
// service name is route to the Web API controller
var serviceName = 'breeze/Breeze';
from
// service name is route to the Web API controller
var serviceName = 'api/Breeze';
它仍然失败并出现与上述相同的错误。
【问题讨论】: