Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to implement signout on using Windows Authentication

0 views
Skip to first unread message

Tommy Wong

unread,
Mar 2, 2008, 11:22:33 PM3/2/08
to
Hi all,

I would like to implement a signout function on my web application like in
SharePoint.
Anyone can provide some references on implementation?

Thanks.


v-wy...@prcvap.microsoft.com

unread,
Mar 4, 2008, 2:15:22 AM3/4/08
to
Hello Tommy,

I’m not sure which kind of Signout you are looking for.
Are you using Form Authentication? Regard to Windows Authentication, if you impersonate the request in your ASP.net application, thread will have your current account permission. If you didn’t want such behavior, you can revert it to the indentity which set to application pool.
[DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern bool RevertToSelf();

Hope this helps,
Best regards,

Wen Yuan
Microsoft Online Support
Microsoft Global Technical Support Center

Get Secure! - www.microsoft.com/security
=====================================================
When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Tommy Wong

unread,
Mar 4, 2008, 9:06:01 PM3/4/08
to
Hello Wen,

Thanks for you reply. May be I make it more clear.

I'm using Window Authentication (i.e. authentication mode="windows" in
web.config)
The behaviour I want is there is a logout link, when user clicks on the
link,
a login window prompts to user.

Currently, I cannot signout after logged in.

Thanks.

<v-wy...@prcvap.microsoft.com> 撰寫於郵件新聞:3db959bf-9d88-4a32...@ms.shabap01.publicpsswebcat...

v-wy...@prcvap.microsoft.com

unread,
Mar 4, 2008, 11:09:14 PM3/4/08
to
Hello Tommy,

I think what you need is Form Authentication which implemented in ASP.net Application.

Regards to Windows Authentication, it’s implemented in IIS. There is no way to logout account in Windows Authentication. When HTTP Request arrive at Web server, IIS will authenticate the identity of request. After that, IIS will redirect the request to ASP.net application. Thereby, it’s not possible to logout acount in ASP.net application, becase the authentication is done by IIS.

Hope this helps.

v-wy...@prcvap.microsoft.com

unread,
Mar 9, 2008, 10:33:49 PM3/9/08
to
Hello Tommy,

I just want to check if there is anything we can help with.
Please feel free to let me know if you have any further issue. We are glad to assist you.

Have a great day,
Best regards,
0 new messages