Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Tue, 19 Feb 2008 13:25:05 -0800,    group: microsoft.public.dotnet.security        back       


How do I clear credentials between calls to a web service?   
I have a test app that makes calls to a web service that requires 
user/password/domain credentials (we're using Basic authentication over SSL). 
 I pass the credentials to the proxy class by creating a NetworkCredential 
object and sticking it in a CredentialCache which the proxy's Credentials 
property gets set to.

If the user doesn't supply credentials I get the expected Access Denied 
exception.  However, once the user has been successfully authenticated the 
credentials don't go away until the app is closed.  Not setting the 
Credentials property on subsequent calls and removing the credential from the 
CredentialCache after calling the proxy's methods have no effect.  This can 
be verified in that the web service always reports the original credentials 
via Thread.CurrentPrincipal.Identity.Name.

Is there a way to clear the credentials between calls to a web service via 
SoapHttpClientProtocol?

Thanks!
date: Tue, 19 Feb 2008 13:25:05 -0800   author:   Ray Megal

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us