[英]Access to the web application denied
我正在開發一個關於visual studio的項目,mvc和c#語言。 這個項目是由我的同事傳遞給我的,問題是當我嘗試登錄時我不能。 多次檢查我認為問題出在角度控制器上。 事實上,當我嘗試登錄時,即使輸入正確的數據,我也會“錯誤”地運行。 給我的錯誤是:“無法加載資源:net :: ERR_CONNECTION_REFUSED [ http:// localhost:1336 / token] ”。
LoginController.prototype.doLogin = function(){
var that = this;
this.authService.login(this.vm.username, this.vm.password).then(
function(response) {
that.layoutService.gotoHome();
}, function(err) {
that.vm.hasInvalidData = true;
}
);
}
看起來本地計算機的端口1336上沒有任何內容正在運行,從而導致Angular AJAX調用失敗。 確保在Visual Studio中配置MVC項目以偵聽端口1336並將其設置為啟動項目。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.