【问题标题】:Angular JS 500 Internal Server errorAngular JS 500 内部服务器错误
【发布时间】:2017-02-21 21:15:34
【问题描述】:

我一直在尝试解决此问题,但无法解决。单击此按钮 btnVerifyWhoYouAre 我收到此 500 内部服务器错误。我在这里做错了吗?

这是我的 Angularjs 文件:

var myApp = angular.module('ValidateSecureEmailApp', ['ui.mask', 'ui.event', 'ui.validate'])
.config(['$httpProvider', function ($httpProvider) {
    $httpProvider.defaults.withCredentials = true;
}]);

// Config to on blur event still with the values
myApp.config(['uiMask.ConfigProvider', function (uiMaskConfigProvider) {
   uiMaskConfigProvider.clearOnBlur(false);
}]);

myApp.controller('ValidateController', ["$scope", "$http", "$window",  function ($scope, $http, $window) {

    $scope.sendForm = function () {

        $('#btnVerifyWhoYouAre').attr('disabled', true);
        $http(
            {
                method: 'POST',
                url: 'Index',
                data: { borrower: JSON.stringify($scope.borrower) }

            }
            ).then(function (response) {
                if (response.data == "Error") {
                    $scope.showfail = true;
                    $('#btnVerifyWhoYouAre').attr('disabled', false);
            } else {

                    if (response.data == "dr")
                    {
                        $window.location.href = '/DocumentUpload/Index'
                    }
                    if (response.data == "qs")
                    {
                        $window.location.href = '/Payment/Index'
                    }
                    if (response.data == "pc")
                    {
                        $window.location.href = '/ConsentDoc/Index'
                    }

                }     
            }, function (response) {
                $scope.showfail = true;
                $('#btnVerifyWhoYouAre').attr('disabled', false);
            });

    };

这是我的路由文件

namespace eMortgageApp
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            //routes.MapRoute(
            //    name: "DocUploadLogin",
            //    url: "{controller}/{action}/{pc}",
            //    defaults: new { controller = "DocUploadLogin", action = "Index", id=UrlParameter.Optional  }
            //);

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}

【问题讨论】:

    标签: angularjs server internal


    【解决方案1】:

    终于找到了解决办法。 AngularJS 不会抛出特定的错误。我们需要更新所有相关文件夹和 Bin 文件夹中的所有文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-17
      • 2011-10-17
      • 2010-11-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多