Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > User information in the web request

Reply
Thread Tools

User information in the web request

 
 
Vadym Stetsyak
Guest
Posts: n/a
 
      05-13-2005
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBNVlA=?=
Guest
Posts: n/a
 
      05-13-2005
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
>
>
>

 
Reply With Quote
 
 
 
 
Vadym Stetsyak
Guest
Posts: n/a
 
      05-13-2005
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" <(E-Mail Removed)> wrote
in message news:(E-Mail Removed)...
> 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
> >
> >
> >



 
Reply With Quote
 
=?Utf-8?B?RWx0b24gVw==?=
Guest
Posts: n/a
 
      05-13-2005
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
http://www.velocityreviews.com/forums/(E-Mail Removed)





"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
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to know if a request come from internal user (employee) orexternal user (vendor) Chris ASP .Net 3 03-26-2010 05:24 PM
searching what groups a user belong from AD but errorThe Kerberos subsystem encountered an error. A service for user protocol request was made rote ASP .Net Security 13 01-04-2008 06:20 AM
Newbie request for information on web hosting Chris NZ Computing 9 12-30-2005 01:18 AM
Re: Accessing Request.InputStream / Request.BinaryRead *as the request is occuring*: How??? Brian Birtle ASP .Net 2 10-16-2003 02:11 PM
System.Web.HttpException: Request timed out - [HttpException (0x80004005): Request timed out.] Steve ASP .Net 0 07-01-2003 12:11 AM



Advertisments