Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 03, 2012 03:44 AM by vahid.ch
May 02, 2012 05:00 AM|LINK
Hi there,I want to get username without Windows Authentication.
let me explain more,I have a web site which is published in IIS,to access pages users should be authenticated and then access to pages.
as we know there are two kinds of authentication,I don't want to use Windows Authentication because of some these reasons:
I have googled so much to find a way about accessing username,another thing I tried was about registy (last logged in user),it works fine in console but as soon as I publish my website in IIS,it retrives last loggedin user in IIS(i mean if I set my website
in Server B it retrives last logged in user in server B ,not in client).
so beside of thsese steps,is there any way to get username(the user which has authenticated in windows)?
tnx in advanced.
May 02, 2012 09:31 AM|LINK
If you are not using Windows authentication, means you are using Forms authentication .
If yes than in Forms authentication you can get current user's username by
May 02, 2012 09:57 AM|LINK
my problem is in here,if I authenticate user,I can get username,but I don't want to authenticate.
imagine that in loginpage.aspx
I have two textbox,username and password,I want to show username automatically(username which already logged in in windows,but I don't want to use windows authetication ),and user just enter his/her password.
May 02, 2012 04:10 PM|LINK
How do you distinguish between two different users with the same password?
May 03, 2012 02:32 AM|LINK
No matter you use windows or forms authenticaion, your web application or IIS server will ask the client to supply credentials for authentication. For windows authentication, the IIS windows authentication module will send challenge to client so that the
client browser will send the authenitcation header(contains the windows user identity info) to server. If you turn off windows authentication(use anonymous access), there is no information sent to server, and you will not be able to get client user identity
info in your ASP.NET app.
#Explained: Windows Authentication in ASP.NET 2.0
If you do want to get clientt user identity without using windows auth at the server, then one means is to use rich web client (such as activeX control or silverlight). Since rich web client can support strong typed code like C# , VB, C++ which can use the
certain API to get the client user information and send them to server. But deploying rich web client add more overhead and complexity and is probably not what you want.
May 03, 2012 03:44 AM|LINK
as I mentioned,after loading loginpage.aspx,I want user name be added automatically.
If I have username,it's no diffrent I have same password or not.
because I'm logging with username not password.