Javascript 未能执行';发送';在';XMLHttpRequest';关于从Asp.Net身份注销
我正在使用Asp.Net标识进行身份验证。当我从应用程序注销时,它显示以下错误 依赖项包是我的angularjs包,它由许多其他模块组成。 使用_LoginPartial页面显示登录、注册和用户下拉列表Javascript 未能执行';发送';在';XMLHttpRequest';关于从Asp.Net身份注销,javascript,angularjs,asp.net-mvc-4,asp.net-identity,asp.net-identity-2,Javascript,Angularjs,Asp.net Mvc 4,Asp.net Identity,Asp.net Identity 2,我正在使用Asp.Net标识进行身份验证。当我从应用程序注销时,它显示以下错误 依赖项包是我的angularjs包,它由许多其他模块组成。 使用_LoginPartial页面显示登录、注册和用户下拉列表 @Html.Partial("_LoginPartial") _局部视图 @using Microsoft.AspNet.Identity @if (Request.IsAuthenticated) { var UserId = User.Identity.GetU
@Html.Partial("_LoginPartial")
_局部视图
@using Microsoft.AspNet.Identity
@if (Request.IsAuthenticated)
{
var UserId = User.Identity.GetUserId();
using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" , @style="display:inline" }))
{
@Html.AntiForgeryToken()
<div class="pc-name-button">
<a href="" class="pc-header-login-button pc-name-link" header-dropdown-link>
<span class="pc-name">@User.Identity.GetUserName()</span>
<span class="i-icon i-glyph-icon-30-downcarrot"></span>
</a>
<div class="dropdown-menu i-linklist-dropdown pc-header-accountDropdown">
@if (User.IsInRole("Admin"))
{
@Html.ActionLink("Admin Panel", "Index", "Admin")
}
else
{
<a href="#">My Fundraisers</a>
<a href="#"><span class="translation_missing" title="translation missing: en.personal.my_donations">My Donations</span></a>
<a href="#">My Settings</a>
}
<a href="javascript: document.getElementById('logoutForm').submit()" delete-link>Log Out</a>
</div>
</div>
}
}
else
{
<a href="@Url.Action("Login","Account")" class="pc-header-login-button">
Log In
</a>
<a href="@Url.Action("Register","Account")" style="margin-left:7px;" class="pc-header-login-button">
Sign Up
</a>
}
我做错了什么需要帮助?最后我自己做了。通过制作一个角度模块和控制器来提交注销表单。 这是密码
(function () {
angular.module('LogOffModule', []).
controller('LogOffController', ['$scope', '$http', function ($scope, $http) {
$scope.submit = function () {
$('#logoutForm').submit();
};
}]);
})()
(function () {
angular.module('LogOffModule', []).
controller('LogOffController', ['$scope', '$http', function ($scope, $http) {
$scope.submit = function () {
$('#logoutForm').submit();
};
}]);