利用微風的Devcurry hottowelsignalr example工作正常,直到我通過nuget升級到1.3.6。微風1.3.6無法獲取元數據
ch12中的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}"
);
}
}
和應用程序/的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';
它仍然失敗,相同的錯誤如上所述。
從我的MVC的理解/的WebAPI routeconfig因爲我的應用程序從http運行://本地主機/ OnlineCollaborationWithSignalR /這條路應該是http://localhost/OnlineCollaborationWithSignalR/breeze/Breeze/Metadata – Tim
我懷疑你的SQL問題與你更改爲使用SQLExpress相關,當我更改爲使用IIS而不是vs2012的iisexpress時,它會提示你使用sqlexpress而不是localdb。 IVe從頭開始再次嘗試,仍然收到元數據錯誤,因爲它試圖從iis根而不是部署位置請求資源。 – Tim