(1) a proxy class, and
(2) the below code
Dim
ws As New <hostserver>.Service1ws.Credentials = System.Net.CredentialCache.DefaultCredentials
___________________________________________________
Are they the same
Dim
ws As New <hostserver>.Service1ws.Credentials = System.Net.CredentialCache.DefaultCredentials
___________________________________________________
Are they the same
Please Explain "A Proxy Class" and "System.Net.CredentialCache.DefaultCredentials"
lekkie
in your example, "a proxy class" would refer to the type "Service1". I'm not sure how the credentials fit in..
Alex DeJarnatt
petxa
Depending on the context.
With regard to a WebRequest:
A proxy class (ie System.Net.WebProxy) allows you to specify proxy server settings for connecting to the Internet.
The code you have specified is simply telling the WebRequest to use the current credentials of the current user context (ie the logged in user) when authenticating with a web server when requesting a resource.
These two things are not related. However, you can set Credentials on the WebProxy to use for authenticating with the proxy server, these can also be the System.Net.CredentialCache.DefaultCredentials.
With regard to a WebService:
A proxy is an object that exists on the client that acts and looks like an object on the server. Invoking a method on the client proxy typically causes some sort of message to be sent to the server (cross-AppDomain, cross-process, cross-Internet, etc) with causes the method to be invoked on the server object.
A proxy class is automatically generated when you add a Web Reference to a Web Service.