("Password", "password"),
- };
-
- request.Content = new FormUrlEncodedContent(nameValueCollection);
-
- // Act
- var response = await client.SendAsync(request);
-
- // Assert - 2
- var exception = response.GetServerException();
- Assert.Equal("The required anti-forgery cookie \"__RequestVerificationToken\" is not present.",
- exception.ExceptionMessage);
- }
-
}
}
\ No newline at end of file
diff --git a/test/WebSites/AntiForgeryWebSite/Controllers/AccountController.cs b/test/WebSites/AntiForgeryWebSite/Controllers/AccountController.cs
index 1a32e742c5..701b421a39 100644
--- a/test/WebSites/AntiForgeryWebSite/Controllers/AccountController.cs
+++ b/test/WebSites/AntiForgeryWebSite/Controllers/AccountController.cs
@@ -31,41 +31,5 @@ namespace AntiForgeryWebSite
{
return "OK";
}
-
- // GET: /Account/FlushAsyncLogin
- [AllowAnonymous]
- public ActionResult FlushAsyncLogin(string returnUrl = null)
- {
- ViewBag.ReturnUrl = returnUrl;
-
- return View();
- }
-
- // POST: /Account/FlushAsyncLogin
- [HttpPost]
- [AllowAnonymous]
- [ValidateAntiForgeryToken]
- public string FlushAsyncLogin(LoginViewModel model)
- {
- return "OK";
- }
-
- // GET: /Account/FlushWithoutUpdatingHeader
- [AllowAnonymous]
- public ActionResult FlushWithoutUpdatingHeader(string returnUrl = null)
- {
- ViewBag.ReturnUrl = returnUrl;
-
- return View();
- }
-
- // POST: /Account/FlushWithoutUpdatingHeader
- [HttpPost]
- [AllowAnonymous]
- [ValidateAntiForgeryToken]
- public string FlushWithoutUpdatingHeader(LoginViewModel model)
- {
- return "OK";
- }
}
}
\ No newline at end of file
diff --git a/test/WebSites/AntiForgeryWebSite/Views/Account/FlushAsyncLogin.cshtml b/test/WebSites/AntiForgeryWebSite/Views/Account/FlushAsyncLogin.cshtml
deleted file mode 100644
index 65ee7aedd1..0000000000
--- a/test/WebSites/AntiForgeryWebSite/Views/Account/FlushAsyncLogin.cshtml
+++ /dev/null
@@ -1,43 +0,0 @@
-@model AntiForgeryWebSite.LoginViewModel
-
-@{
- ViewBag.Title = "Log in";
- Layout = "/Views/Shared/_FlushAsyncLayout.cshtml";
-}
-
-@section Login
-{
-@ViewBag.Title.
-
-}
diff --git a/test/WebSites/AntiForgeryWebSite/Views/Account/FlushWithoutUpdatingHeader.cshtml b/test/WebSites/AntiForgeryWebSite/Views/Account/FlushWithoutUpdatingHeader.cshtml
deleted file mode 100644
index 97cf95a94e..0000000000
--- a/test/WebSites/AntiForgeryWebSite/Views/Account/FlushWithoutUpdatingHeader.cshtml
+++ /dev/null
@@ -1,37 +0,0 @@
-@model AntiForgeryWebSite.LoginViewModel
-
-@await FlushAsync()
-
-@ViewBag.Title.
-
diff --git a/test/WebSites/AntiForgeryWebSite/Views/Shared/_FlushAsyncLayout.cshtml b/test/WebSites/AntiForgeryWebSite/Views/Shared/_FlushAsyncLayout.cshtml
deleted file mode 100644
index 08c9240c47..0000000000
--- a/test/WebSites/AntiForgeryWebSite/Views/Shared/_FlushAsyncLayout.cshtml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
- @ViewBag.Title – AntiForgery Functional Tests
-
-@SetAntiForgeryCookieAndHeader()
-@await FlushAsync()
-
-
- @Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
-
- @RenderBody()
- @await RenderSectionAsync("Login", required: false)
-
-
-
\ No newline at end of file