diff --git a/samples/AntiforgerySample/FormPostSampleMiddleware.cs b/samples/AntiforgerySample/FormPostSampleMiddleware.cs index dc27fb7abe..494e84a0b5 100644 --- a/samples/AntiforgerySample/FormPostSampleMiddleware.cs +++ b/samples/AntiforgerySample/FormPostSampleMiddleware.cs @@ -22,7 +22,7 @@ namespace AntiforgerySample { _next = next; _antiforgery = antiforgery; - _options = options.Options; + _options = options.Value; } public async Task Invoke(HttpContext context) diff --git a/test/Microsoft.AspNet.Antiforgery.Test/AntiforgeryOptionsSetupTest.cs b/test/Microsoft.AspNet.Antiforgery.Test/AntiforgeryOptionsSetupTest.cs index b3b9bc72e5..946a0812e6 100644 --- a/test/Microsoft.AspNet.Antiforgery.Test/AntiforgeryOptionsSetupTest.cs +++ b/test/Microsoft.AspNet.Antiforgery.Test/AntiforgeryOptionsSetupTest.cs @@ -36,14 +36,13 @@ namespace Microsoft.AspNet.Antiforgery { // Arrange var serviceCollection = new ServiceCollection(); - serviceCollection.AddAntiforgery(); - serviceCollection.ConfigureDataProtection(o => o.SetApplicationName("HelloWorldApp")); - serviceCollection.Configure(o => { Assert.Null(o.CookieName); o.CookieName = "antiforgery"; - }, order: 9999); + }); + serviceCollection.AddAntiforgery(); + serviceCollection.ConfigureDataProtection(o => o.SetApplicationName("HelloWorldApp")); var services = serviceCollection.BuildServiceProvider(); var options = services.GetRequiredService>(); diff --git a/test/Microsoft.AspNet.Antiforgery.Test/TestOptionsManager.cs b/test/Microsoft.AspNet.Antiforgery.Test/TestOptionsManager.cs index 9df6d86e2d..e1c1c5cbcc 100644 --- a/test/Microsoft.AspNet.Antiforgery.Test/TestOptionsManager.cs +++ b/test/Microsoft.AspNet.Antiforgery.Test/TestOptionsManager.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Antiforgery public TestOptionsManager(AntiforgeryOptions options) { - Options = options; + Value = options; } public AntiforgeryOptions Value { get; set; } = new AntiforgeryOptions();