RE: Use of Login Control



Thank you for the help. I have a question regarding the information to which
you directed me. I am instructed:

Add a Page_Load Event Handler
Add the following code to the Page_Load event handler of your Default.aspx
page. This page should be displayed only to authenticated users. To prove
that this is the case, the code displays information obtained from the forms
authentication ticket that is issued to authenticated users.

protected void Page_Load(object sender, EventArgs e)
{
Response.Write("Hello, " + Server.HtmlEncode(User.Identity.Name));

FormsIdentity id = (FormsIdentity)User.Identity;
FormsAuthenticationTicket ticket = id.Ticket;

Response.Write("<p/>TicketName: " + ticket.Name );
Response.Write("<br/>Cookie Path: " + ticket.CookiePath);
Response.Write("<br/>Ticket Expiration: " +
ticket.Expiration.ToString());
Response.Write("<br/>Expired: " + ticket.Expired.ToString());
Response.Write("<br/>Persistent: " + ticket.IsPersistent.ToString());
Response.Write("<br/>IssueDate: " + ticket.IssueDate.ToString());
Response.Write("<br/>UserData: " + ticket.UserData);
Response.Write("<br/>Version: " + ticket.Version.ToString());
}


I assume that this is aspx code. Where do I place this in the default.aspx
file?

--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


"Manish Bafna" wrote:

Hi,
This is actually easy to-do with ASP.NET 2.0 using the
ActiveDirectoryMembership provider. Below msdn link describes how to do it:
http://msdn2.microsoft.com/en-us/library/ms998360.aspx
--
Hope this helps.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.



"Chaplain Doug" wrote:

Visual Studio 2005 Express. I would like to have the login control validate
logins using Active Directory. That is, I would like to have user logins
checked against the AD in our server (Windows Server 2003). How may I
accomplish this?
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org
.



Relevant Pages

  • Re: Permissions to do AD Lookups?
    ... member of domain users, and the well known security principal ... Authenticated Users has all the permissions you need. ... Microsoft MVP - Windows Server - Directory Services ...
    (microsoft.public.windows.server.active_directory)
  • RE: Use of Login Control
    ... Dr. Doug Pruiett ... Good News Jail & Prison Ministry ... "Manish Bafna" wrote: ... This page should be displayed only to authenticated users. ...
    (microsoft.public.vsnet.general)
  • RE: AD users and computers security
    ... Authenticated Users Group Has Too Many Permissions to the SYSVOL Network ... Windows Server 2003 family provides three groups whose ... membership is controlled by the administrator: ... many Windows services do not start. ...
    (microsoft.public.windows.server.migration)
  • Re: Everyone vs Authenticated Users
    ... Microsoft MVP (Windows Server: Security) ... that say Everyone to Authenticated Users? ... network and I need to tighten things up first. ...
    (microsoft.public.windows.server.security)
  • Re: first logon - user permissions
    ... >I made a new setup on windows server 2000. ... >The whole installation is done. ... Verify that Everyone and Authenticated Users has the right to access the ...
    (microsoft.public.windows.server.active_directory)

Loading