Reputation: 452
I'm following this tutorial. It asks me to paste this code into my Startup.cs file configure method:
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationScheme = "Cookies",
LoginPath = new StringPath("/Account/Login"),
AccessDeniedPath = new StringPath("/Home/Forbidden"),
AutomaticAuthenticate = true,
AutomaticChallenge = true
});
the StringPath() object throws an error. Missing directive or reference. For whatever reason I get no results when I google StringPath() C# or anything close to that. It doesn't suggest a namespace to include in my file. What namespace does this object belong to?
Upvotes: 0
Views: 62
Reputation: 4261
I guess you followed this tutorial or some copy of it, maybe with typos.
Take a look, here is usage of PathString
structure and not StringPath
.
Upvotes: 2