473,386 Members | 1,801 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,386 software developers and data experts.

User information in the web request

Hi there!
Is it possible to retieve user nt name from the web request? This question
arose while thinking about authentication system implementation in the
asp.net.

I want to make authentication process transparent for the user. E.g. if the
user is logged on the domain or is a member of the domain then perform
authentication autimatically - as a result user won't experience any login
windows, otherwise web-app will provide the form similar the IIS one for
authentication.

Can this be done from the web application?

TIA
--
Vadym Stetsyak
Nov 19 '05 #1
3 1373
You can tell who the user is once they are logged into the app, but you will
get IUSR_ComputerName or NetworkSystem prior to this point, as web apps are
anon by default.

There are ways to set up IE on an Intranet to avoid the login. An even
better option is issuing user certs, as the user can work from any computer
he has a cert without having to worry about login.
---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"Vadym Stetsyak" wrote:
Hi there!
Is it possible to retieve user nt name from the web request? This question
arose while thinking about authentication system implementation in the
asp.net.

I want to make authentication process transparent for the user. E.g. if the
user is logged on the domain or is a member of the domain then perform
authentication autimatically - as a result user won't experience any login
windows, otherwise web-app will provide the form similar the IIS one for
authentication.

Can this be done from the web application?

TIA
--
Vadym Stetsyak

Nov 19 '05 #2
Thanks for the answer, I know about these ways, just wondered if it can be
completed in the other way

"Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM> wrote
in message news:84**********************************@microsof t.com...
You can tell who the user is once they are logged into the app, but you will get IUSR_ComputerName or NetworkSystem prior to this point, as web apps are anon by default.

There are ways to set up IE on an Intranet to avoid the login. An even
better option is issuing user certs, as the user can work from any computer he has a cert without having to worry about login.
---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"Vadym Stetsyak" wrote:
Hi there!
Is it possible to retieve user nt name from the web request? This question arose while thinking about authentication system implementation in the
asp.net.

I want to make authentication process transparent for the user. E.g. if the user is logged on the domain or is a member of the domain then perform
authentication autimatically - as a result user won't experience any login windows, otherwise web-app will provide the form similar the IIS one for
authentication.

Can this be done from the web application?

TIA
--
Vadym Stetsyak

Nov 19 '05 #3
Hi Vadym,

If you use windows authentication and deny anonymous access:
In web.config
<authentication mode="Windows" />
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>

Then you can use
Context.User.Identity.Name

to get Domain/userID.

And use

Context.User.IsInRole(strRole)

to perform role checking.

HTH

Elton Wang
el********@hotmail.com

"Vadym Stetsyak" wrote:
Hi there!
Is it possible to retieve user nt name from the web request? This question
arose while thinking about authentication system implementation in the
asp.net.

I want to make authentication process transparent for the user. E.g. if the
user is logged on the domain or is a member of the domain then perform
authentication autimatically - as a result user won't experience any login
windows, otherwise web-app will provide the form similar the IIS one for
authentication.

Can this be done from the web application?

TIA
--
Vadym Stetsyak

Nov 19 '05 #4

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

Similar topics

1
by: jach | last post by:
How can I get the domain, username and PC network name (Win 2000 Pro & Win XP Pro PC's) of the current logged on user (logged onto a domain and access an intranet page, Window 2000 server running...
60
by: Fotios | last post by:
Hi guys, I have put together a flexible client-side user agent detector (written in js). I thought that some of you may find it useful. Code is here: http://fotios.cc/software/ua_detect.htm ...
5
by: Andrew Banks | last post by:
Using forms authentication in C# I usually use FormsAuthentication.RedirectFromLoginPage to log a user in as follows FormsAuthentication.RedirectFromLoginPage(id,false); How can I log a user...
7
by: jsale | last post by:
I'm currently using ASP.NET with VS2003 and SQL Server 2003. The ASP.NET app i have made is running on IIS v6 and consists of a number of pages that allow the user to read information from the...
4
by: morc | last post by:
hi, is there any way to refresh the page when the user clicks back button?I have a jsp page that i need to regerenate everything everytime the user visits it. its either that or i want to...
0
by: Darrin | last post by:
I have a ASP.NET (using vb.net) application setup that allows someone to fill out an application form. The form goes across multiple pages (10) so on the first page I assign a unique ID and store...
2
by: Fox1977 | last post by:
Hi folks, Just wondering if anyone can help me out with this problem I'm having getting a particular .net web application to run on a windows 2003 r2 x64 platform running as a domain account. ...
15
by: paul814 | last post by:
Is it possible to display the logged in user that is accessing the form, in a textbox? so say I have txtname I want to display the username of the person that is logged in to the PC in that...
2
by: RAB | last post by:
When an anonymous user visits my website what basic information can I gather about them? I thought I read somewhere that I could get the name of the server that is requesting my website http code?...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.