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 March 14th, 2007, 06:17 PM
Registered User
 
Join Date: Mar 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default User name is blank in Login Page

Hi all,

Iam using form authentication in my web app. After user login i want to redirect depends on user info.
My problem is :

User.Identity.name is blank in login page but its working fine in other page.

Forms Authentication in web.config file


<forms name="Authcookie" loginUrl="LogIn.aspx" protection="All" />

private

void btnlogin_Click(object sender, System.EventArgs e)
{ if(checking User credentials)


{ Id=somevalue;
FormsAuthentication.SetAuthCookie(Id.ToString(),fa lse);

Response.Write(User.Identity.Name.ToString());

//Response.Write(Context.User.Identity.Name.ToString ());

}
}

Thanks in advance.





Similar Threads
Thread Thread Starter Forum Replies Last Post
login script: user can't hit "return" for login dmerrill Java Basics 13 July 14th, 2006 07:25 PM
login failed for user domain\user babakwx SQL Server 2000 2 May 30th, 2006 12:28 PM
Newbie Help. Login to unique login page per user Kainan Classic ASP Professional 10 May 3rd, 2005 07:47 AM
login failed for user nt authority\anonymous login rj1406 Classic ASP Databases 1 October 24th, 2004 09:15 AM





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