[英]Access to the web application denied
I'm working on a project on visual studio, mvc with c # language. 我正在开发一个关于visual studio的项目,mvc和c#语言。 this project was passed to me by a colleague of mine and the problem is that when I try to log in I can't.
这个项目是由我的同事传递给我的,问题是当我尝试登录时我不能。 checking it several times I think the problem is on the angular controller.
多次检查我认为问题出在角度控制器上。 in fact when I try to log in I get "err" running even though I enter the correct data.
事实上,当我尝试登录时,即使输入正确的数据,我也会“错误”地运行。 the mistake that gives me is this: "Failed to load resource: net::ERR_CONNECTION_REFUSED [ http://localhost:1336/token] ".
给我的错误是:“无法加载资源: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;
}
);
}
It looks like there is nothing running on port 1336 of your local machine, thus causing the Angular AJAX call to fail. 看起来本地计算机的端口1336上没有任何内容正在运行,从而导致Angular AJAX调用失败。 Make sure that you configure your MVC project in Visual Studio to listen on port 1336 and that it is set up as the Start-up project.
确保在Visual Studio中配置MVC项目以侦听端口1336并将其设置为启动项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.