469,568 Members | 1,425 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,568 developers. It's quick & easy.

Impersonating user


Hi,

I have a asp.net application, which control virtual directory, we want any
user to access and we do not want to use windows authentication(we do not
want windows authentication dialog) or forms authentication(as we do not
want any login page). However we want to impersonate the user.

Could anyone tell how to achieve this.

thanks,
Kedar.
Sep 12 '07 #1
2 1349
if you want to impersonate the user you need to pick some
authentication. browsers are getting more reluctant to send credentials
without informing the user.

also if your code impersonates the user than accesses a share, you will
need a primary security token. this come only kerberos or basic
authentication (which always display a dialog box).
-- bruce (sqlwork.com)

kedar wrote:
Hi,

I have a asp.net application, which control virtual directory, we want any
user to access and we do not want to use windows authentication(we do not
want windows authentication dialog) or forms authentication(as we do not
want any login page). However we want to impersonate the user.

Could anyone tell how to achieve this.

thanks,
Kedar.

Sep 12 '07 #2
You mean you want it to impersonate whoever logs in, but never give a login?

If so, use windows authentication and you are fine. As long as you are on a
domain, that is. If you mean you want an external user (someone coming in
from a public location) to get in without logging on, it is not going to
happen without either a) including the external machine in your domain (a
lot of work) or b) the user VPNing in with a domain account.

The windows auth dialog only pops up when the user cannot be determined.

Now, you can impersonate a single user rather easily. Just set up the user
in the web.config file. If you want to impersonate the user "logging in",
you have to use windows auth. There is a risk, if the network is not set up
correctly, of having the dialog pop up.

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

*************************************************
| Think outside the box!
|
*************************************************
"kedar" <ke******@hotmail.comwrote in message
news:uc**************@TK2MSFTNGP02.phx.gbl...
>
Hi,

I have a asp.net application, which control virtual directory, we want any
user to access and we do not want to use windows authentication(we do not
want windows authentication dialog) or forms authentication(as we do not
want any login page). However we want to impersonate the user.

Could anyone tell how to achieve this.

thanks,
Kedar.

Sep 12 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Jason | last post: by
2 posts views Thread by Leonardo Arena | last post: by
1 post views Thread by accyboy1981 | last post: by
5 posts views Thread by fab | last post: by
4 posts views Thread by =?iso-8859-1?q?Eir=EDkur_Fannar_Torfason?= | last post: by
1 post views Thread by =?Utf-8?B?c3VidGlsZQ==?= | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.