简体   繁体   中英

Access to the web application denied

I'm working on a project on visual studio, mvc with c # language. 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] ".

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM