473,320 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to get network user name with FORMS authentication

Don
I'm using FROMS authentication and want to automate the login.

Right now I force the user to manually log in. I would like to detect
the users network userName and if they have an account I will
automatically log them in. If they don't they wil be taken to the
login page.

I can get the network id of the user using System.Environment.UserName
if I turn off anonymous access but this gived me an access denied
error. If I turn on anonymous access I can get the the page but the
userName I get is the IUsr account.

How can I get the network user id?

Don

Nov 19 '05 #1
3 2074
Turn off anonymous access, use Integrated Windows Authenication, and use the
PageUser.Identity.Name to get the login name.

"Don" <ch*********@hotmail.com>
???????:11**********************@g43g2000cwa.googl egroups.com...
I'm using FROMS authentication and want to automate the login.

Right now I force the user to manually log in. I would like to detect
the users network userName and if they have an account I will
automatically log them in. If they don't they wil be taken to the
login page.

I can get the network id of the user using System.Environment.UserName
if I turn off anonymous access but this gived me an access denied
error. If I turn on anonymous access I can get the the page but the
userName I get is the IUsr account.

How can I get the network user id?

Don

Nov 19 '05 #2
Don
When I try this I get an exception when I try to redirect to another
page. The exception message is 'Thread was being aborted".

I turned off allow anonymous access and set authentication
mode='Windows".

Nov 19 '05 #3
Don
This is what I'm trying to accomplish:
I have an application called MasterSite that is used to authenticate
users for all of our applications. Since we may have users that are
not on our Domain each application needs to use FORMS authentication
and the login URL is a page in this MasterSite application. This login
page validates the suer against a table in the database.
This works fine, the users are redirected to the login page in the
MasterSite application, the FormsAuthentication Cookie is added to the
response, and the response if redirected to the calling application.

I then wanted to add the abiliy for our Domain users to seemlessly
login. I added a column to the user table that holds a users network
login name. I can then look up a user in page_load and if that network
login name existis I can log them in as that user and redirect back to
the calling application. If the network name does nto exist I continue
process the page and they get the login prompt.
Users on our domain who be automatically logged it but user not on the
Domain could still manually login.

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
by: Thomas | last post by:
after spending countless hours trying, i give up and hope to get some help in here. on server1 i got the web myweb.com with my test.asp. in the test.asp, i'm trying to read a file from an UNC...
1
by: srivalli chavali via DotNetMonster.com | last post by:
Hi, I have a question regd. Windows authentication and network file access. My asp.net application doesn't use any of the .NET's authentication schemes (Forms, Windows or Passport) yet. I have...
4
by: Dan Bart | last post by:
I am using an application which is a modification of IBuySpy Portal. It is using Forms authentication. Users login and their name is added to Context Then I use: ...
0
by: Marvin | last post by:
We have an ASP.Net application that is being stored on a file share seperate from the IIS server machine. The application has been designed to use NT authentication (via User.Identity.Name) to...
5
by: Dave Kolb | last post by:
Is there any other solution for an ASPNET application to access network resources other than running as SYSTEM, using delegation (a nightmare to get to work) or the COM+ solution? I cannot seem to...
15
by: Tom Nowak | last post by:
I am writing a webapp in which a user is required to enter a login id and password on a login form. I have forms authenticaion coded in my web.config. Once the user is logged in, I want to use the...
5
by: lmttag | last post by:
ASP.NET 2.0 (C#) application Intranet application (not on the Internet) Using Windows authentication and impersonation Windows Server 2003 (IIS6) Server is a member server on a domain Logged...
2
by: antonyliu2002 | last post by:
I am testing ASP.NET 2.0 Forms athentication with user credentials in SQL Server 2005. I don't want to put user credentials in web.config, so the credentials section is commented out. The...
0
by: danasegarane | last post by:
Hi all I want to map a network drive. If the user has access to that site then that path will map automatically. If the user doesnt have any rights the i need to get the username and pwd from the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.