Hello everyone and thanks for your help in advance. I am new to Identity and am trying to create my first project using OWIN, however what I have created does not seem to secure any of the pages. I am trying to follow the example located at:
http://benfoster.io/blog/aspnet-identity-stripped-bare-mvc-part-1
I have created a simple MVC project and included Microsoft.Owin.Host.SystemWeb and Microsoft.Owin.Security.Cookies nugget packages. Within the Startup.vb, I have the following code:
Imports Owin
Imports Microsoft.Owin
Imports Microsoft.Owin.Security.Cookies
Imports Microsoft.AspNet.Identity<Assembly: OwinStartupAttribute(GetType(Startup))>
Partial Public Class Startup
Public Sub Configuration(app As IAppBuilder)
app.UseCookieAuthentication(New CookieAuthenticationOptions() With {.AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, .LoginPath = New PathString("/Login")})
End Sub
End ClassI created a folder called Login with a page Default.vbhtml. I created a basic HTML page within the root directory called Default.html. I expected that when attempting to browse to the Default.html page, I would be redirected to Default.vbhtml page within the Login folder, however, the Default.html page displays without any type of challenge or redirect. Obviously, I have done something wrong, but I'm not sure what. I will also mention I have not tried this on a server yet, instead running on my Windows 10 professional with VS 2015, but I don't think that should matter. Any help would be appreciated.