tags:

views:

33

answers:

2

what is the authType in CredentialCache.Add Method ? http://msdn.microsoft.com/en-us/library/czdw7s9e.aspx I do not understand what should I pass to it based on the uRi that I am passing to this Add method. and my uRi is actually an asmx page address

A: 

The authType seems to refer to how the credential(username and password) you provide is sent with a http web request. Basic roughly means unencrypted, and digest means that you send a hash along with the request to authenticate it. Note that this authentication type is decided by the server adn you dont have a choice as to which one to follow.
See Basic Authentication and Digest Authentication

apoorv020
A: 

There are two main HTTP authentication schemes:

  • BASIC: user name and password are added in clear to the HTTP request headers
  • DIGEST: the server chalenges the client with a nonce and the client responds with a hash (digest) of the nonce and the password, which the server can verify

The authType parameters is the HTTP authentication scheme for which the credentials are added to the cache. When making a request, the server will first respond with a 403 and specify an authentication schem supported, along with the realm and the nonce (if required). The request will then use the credentials cache to respond to the chalenge, if the requested authentication type is in the cache (basic or digest). Subsequent calls after the first call may pre-send the authentication info, if PreAuthenticate is set.

Remus Rusanu