Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 22nd, 2003, 01:37 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default Authentication

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?
 
Old August 22nd, 2003, 03:29 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You should be able to use your own computer. Any machine on the network will talk to the domain controller be it your server or another if said machine is part of the domain controllers domain.
 
Old August 22nd, 2003, 11:30 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

u sould able to do it in ur our computer since its ur server in that case! & I dont know if u have problem, since I set my web.Config like:
Code:
<authorization>
  <allow users="user" /> 
  <deny users="?" /> 
</authorization>
When I didnt set allow tag I couldnt do it.
make me know if u have done!

Always:),
Hovik Melkomian.
 
Old August 25th, 2003, 09:50 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I am still getting the windows logon prompt. Is there a way not to get this?


This is what I'm getting once I enter my logon information.

Authenticated: True

UserName: ED\stu9820

Authentication Type: Negotiate



Thanks for your help.
 
Old December 7th, 2009, 05:31 AM
Registered User
 
Join Date: Dec 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy How can I authenticate?

How can I authenticate if you will input a username and a password in the login control and I will redirect to the 2nd page. If your want to open the 2nd page, it will not be open unless you will enter the username and password. You can't open the second page also in the address bar unless you'll input your username and password. How can I do that?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Authentication r_ganesh76 ASP.NET 1.0 and 1.1 Professional 3 January 18th, 2008 11:34 AM
Authentication koco ASP.NET 2.0 Professional 1 August 21st, 2007 09:02 AM
Authentication speedyH Beginning PHP 1 September 25th, 2004 11:34 AM
Authentication PbsiGuru General .NET 6 March 24th, 2004 02:41 PM
Authentication dbradley ASP.NET 1.0 and 1.1 Basics 2 August 13th, 2003 10:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.