This method initializes the VC class with information such as: VC name, proxy, and credentials.
All calls using VC or Scope will use this information when communicating with
Cosmos. This method can be called multiple times to change the information.
Namespace: VcClientAssembly: VcClient (in VcClient.dll) Version: 1.0.0.0 (1.8.400.4142)
Syntax
C# |
---|
public static void Setup( string vcName, string proxy, string userName ) |
Visual Basic |
---|
Public Shared Sub Setup ( _ vcName As String, _ proxy As String, _ userName As String _ ) |
Visual C++ |
---|
public: static void Setup( String^ vcName, String^ proxy, String^ userName ) |
Parameters
- vcName
- Type: String
VC name in "http://" or "vc://" format.
- proxy
- Type: String
The proxy server. Specify this if you explicitly need to connect using a proxy server. If no proxy should be used, then specify NoProxy.
- userName
- Type: String
The username in Domain\username format. Also, this user name needs to be encoded first with Encode(String, String) method.
Examples
In the following example, since a user name is not provided, the encoded credentials will be used (see Encode(String, String)).
Since the VC name has been specified, it will be possible to use relative paths when using other VC methods.
In the following example, the password for the specified user will be retrieved from the encoded credentials. Since a
proxy was not specified, the default proxy will be used when connecting from Corpnet. Relative paths cannot be used.
CopyC#
VC.Setup("http://cosmos04.osdinfra.net/cosmos/MyVc", null, null);
CopyC#
VC.Setup(null, null, "PHX\\Johndoe");