No one in the beginner forum could answer this so I'm guessing it's a "professional" question although I'm a beginner. I'm trying to authenticate users in our domain. I've heard it can be done but I'm not sure so here goes. If a user first logs into a computer in the morning and they go to a website that with classic ASP they have to re-enter their domain, username, and password. I've read with ASP.NET that you can verify them as already being authenticated and let them enter the site. Here is what I have so far.
Web.config:
<authorization>
<deny users="?" />
</authorization>
Code Behind:
Imports System.Web.Security
Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents spnAuthenticated As HtmlGenericControl
Protected WithEvents spnUserName As HtmlGenericControl
Protected WithEvents spnAuthenticationType As HtmlGenericControl
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
spnAuthenticated.InnerText = User.Identity.IsAuthenticated
spnUserName.InnerText = User.Identity.Name
spnAuthenticationType.InnerText = User.Identity.AuthenticationType
End Sub
End Class
I am reading MCAD/MCSD ASP.NET with
VB.NET by Jeff Webb.
My question is, can I use my computer to test this or do I have to use the main server to talk to the domain controller?