ISA Proxy authentication

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
Andrey99

ISA Proxy authentication

Post by Andrey99 » Tue Mar 08, 2005 5:41 pm

I tried to use Vault Client in my office there we have ISA proxy configured for web access. I entered proxy address and port into Vault settings dialog. When I tried to connect to vault demo service, proxy authentication dialog popped up. I entered my username, password and domain and got error back: "Proxy authentication failed".
I have no access to ISA configuration and I don't know how it is currently configured. What is interesting though that the following bit of code works fine from the same computer:

Code: Select all

WebReference.VaultService ws = new WebReference.VaultService();
WebProxy proxy = new WebProxy("xx.xx.x.xxx", 8080);
proxy.Credentials = CredentialCache.DefaultCredentials;

ws.Url = "http://tipton.sourcegear.com/vaultservice/vaultservice.asmx";
ws.Proxy = proxy;

Console.WriteLine("Connecting...");
ws.Ping();

Console.WriteLine("Success");
Console.ReadLine();
Is there a way to make Vault Client use DefaultCredentials? Could be useful in situations like this.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Mar 09, 2005 8:20 am

Vault does use System.Net.CredentialCache.DefaultCredentials for service and proxy credentials. We should only prompt for proxy login after we get a ProxyAuthenticationRequired exception from the request to the server.

Guest

Post by Guest » Thu Mar 10, 2005 3:45 pm

Jeremy,

I played around with Reflector on your code and yes, initially VaultConnection.InitService method sets DefaultCredentials:

Code: Select all

this._clientService.Proxy.Credentials = this.GetNetworkCredentials();

private ICredentials GetNetworkCredentials()
{
      return CredentialCache.DefaultCredentials;
} 
However, later on you call VaultConnection.ResetProxy, which contains this bit of code:

Code: Select all

else if (proxySetting == 1)
{
	if (!proxyManServer.StartsWith("http://") && !proxyManServer.StartsWith("https://"))
	{
		proxyManServer = "http://" + proxyManServer;
	}
	if (proxyManPort != string.Empty)
	{
		proxyManServer = proxyManServer + ":" + proxyManPort;
	}
	WebProxy proxy1 = new WebProxy(proxyManServer);
	this._clientService.Proxy = proxy1;
}
As you can see, proxy reference gets overridden with new proxy object which does not contain any credentials. This is why it does not work...

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Fri Mar 11, 2005 7:55 am

Email me using the button below this post, and I'll send you a temp build of the client to see if that helps you.

markjjordan
Posts: 5
Joined: Wed Oct 26, 2005 11:08 am

Post by markjjordan » Wed Oct 26, 2005 11:17 am

Was this issue resolved by any chance? It appears from the last post that there may have been a fix of some sort?

We are currently experiencing the same problem... same result message for the proxy of "Proxy Authentication failed."

Our customer is using a NetApp NetCache appliance for a proxy (that's all of the details I know... I'm a software guy... not hardware 8^). We site on their network, and would like to access the Vault at our offices outside of their network. They do allow http access to the outside, and they have also opened up everything to our domain name.

Any help would be appreciated.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Oct 26, 2005 12:22 pm

This should have been fixed in the 3.0.6 client. What version of Vault are you using?

markjjordan
Posts: 5
Joined: Wed Oct 26, 2005 11:08 am

Post by markjjordan » Wed Oct 26, 2005 12:54 pm

Version 3.1.1 (3506)

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Oct 26, 2005 1:11 pm

Can you get more information by turning on Vault client logging?

markjjordan
Posts: 5
Joined: Wed Oct 26, 2005 11:08 am

Post by markjjordan » Wed Oct 26, 2005 1:28 pm

Here you go. I set the .config file to the following:
...
<add key="enableLogging" value="true" />
<add key="classesToLog" value="all" />
...

Here is the log output:

10/26/2005 3:25:55 PM <generic>: [<No Name>:9560] VaultGUIClient, Version=3.1.1.3506, Culture=neutral, PublicKeyToken=null
10/26/2005 3:25:55 PM <generic>: [<No Name>:9560] Logging all classes
10/26/2005 3:25:57 PM <statussearch>: [GUIClientWorkerThread:8896] Refresh called
10/26/2005 3:25:57 PM <statussearch>: [GUIClientWorkerThread:8896] Returning from refresh early (no GCI, CI, or TC)
10/26/2005 3:25:57 PM <statussearch>: [GUIClientWorkerThread:8896] Refresh finished
10/26/2005 3:25:58 PM <connection>: [GUIClientWorkerThread:8896] InitService started.
10/26/2005 3:26:03 PM <connection>: [GUIClientWorkerThread:8896] InitService finished.
10/26/2005 3:26:10 PM <statussearch>: [Main:9560] Connection state changed from Unconnected to Connecting
10/26/2005 3:26:10 PM <emailview>: [Main:9560] Connection state changed from Unconnected to Connecting
10/26/2005 3:26:10 PM <connection>: [GUIClientWorkerThread:8896] Login started.
10/26/2005 3:26:20 PM <connection>: [GUIClientWorkerThread:8896] Login started.
10/26/2005 3:26:21 PM <statussearch>: [Main:9560] Connection state changed from Connecting to Disconnecting
10/26/2005 3:26:21 PM <connection>: [GUIClientWorkerThread:8896] Logout started.
10/26/2005 3:26:21 PM <emailview>: [Main:9560] Connection state changed from Connecting to Disconnecting
10/26/2005 3:26:22 PM <connection>: [GUIClientWorkerThread:8896] Logout finished.
10/26/2005 3:26:22 PM <statussearch>: [Main:9560] Active repository changed to
10/26/2005 3:26:22 PM <emailview>: [Main:9560] Active repository changed to
10/26/2005 3:26:22 PM <statussearch>: [Main:9560] Connection state changed from Disconnecting to Unconnected
10/26/2005 3:26:22 PM <emailview>: [Main:9560] Connection state changed from Disconnecting to Unconnected
10/26/2005 3:26:27 PM <statussearch>: [Main:9560] GetSettingTable started
10/26/2005 3:26:27 PM <statussearch>: [Main:9560] GetSettingTable finished
10/26/2005 3:26:27 PM <generic>: [<No Name>:10968] SimpleLogger finalized

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Oct 26, 2005 2:04 pm

How far along do you get in the troubleshooting guide at

http://support.sourcegear.com/viewtopic.php?p=2450

?

markjjordan
Posts: 5
Joined: Wed Oct 26, 2005 11:08 am

Post by markjjordan » Wed Oct 26, 2005 2:15 pm

Yup... already tried to do troubleshooting with the document last Friday.

I am able to access the install page from our client's network with the url of http://vault.domain.com/VaultService/serverInstall.html. (domain name changed for protection).

I can also access http://vault.domain.com/VaultService/VaultService.asmx with no problems from the client's network.

Also, my .config file currently has the following in it:

<proxy usesystemdefault="false" proxyaddress="http://cproxy01.inet.clientDomain.com:8080" bypassonlocal="false"/>

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Oct 26, 2005 2:22 pm

Try removing the proxy configuration from your .config file. That setting shouldn't be needed for recent versions. You'll specify the proxy information in Tools->Options->Network Settings

markjjordan
Posts: 5
Joined: Wed Oct 26, 2005 11:08 am

Post by markjjordan » Wed Oct 26, 2005 2:26 pm

When I remove it, and keep the following, I still get the same error:

<proxy usesystemdefault="true" />

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Oct 26, 2005 2:34 pm

Email me using the button below this post, and we'll try to figure out what's going on.

Post Reply