Identity.IsAuthenticated always false ??
From: Claude Vernier (ClaudeVernier_at_discussions.microsoft.com)
Date: 06/28/04
- Previous message: Gionni: "Https and certificate store"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: Identity.IsAuthenticated always false ??"
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: Identity.IsAuthenticated always false ??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 28 Jun 2004 09:12:01 -0700
Hello, I already posted about Unit tests some posts ago
but I'm still having a problem and I can't figure out any clues...
I got this DLL that contains all the logic for a web application.
Two web-applications will use it (for a start), one with Windows Authentication
and one with anonymous or custom forms.
Also, my DLL is tested by a WinForm application: NUnit-GUI.
This DLL must call several web services.
Most are using Windows Authentication, some don't.
I need a way to determine if user is logged and if not, I map it to a guest user.
I was using this code:
if( System.Threading.Thread.CurrentPrincipal.Identity.IsAuthenticated )
//... use System.Net.CredentialCache.DefaultCredentials
else
//... create new Network credentials...
Testing in NUnitGUI, I found that System.Threading.Thread.CurrentPrincipal.Identity.IsAuthenticated
thinks that I'm not authenticated, while I am...
Is there any rational explanation to this ??
Thanks you very much!
Claude Vernier
- Previous message: Gionni: "Https and certificate store"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: Identity.IsAuthenticated always false ??"
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: Identity.IsAuthenticated always false ??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|