Automatically connect using this profile

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

Moderator: SourceGear

Post Reply
Hans Olav Nymand
Posts: 55
Joined: Wed Sep 29, 2004 8:09 am
Location: Denmark, Copenhagen
Contact:

Automatically connect using this profile

Post by Hans Olav Nymand » Mon Jan 03, 2005 5:28 am

Hello,

I am new to this Vault support forum so I hope I use it correctly.

I have just recently upgraded to Vault 3.0.0 and I am using Vault both from the Vault Client itself and via Visual Studio integration.

In my Vault Client startup settings I have specified a profile and that vault should connect automatically using this profile. I have also specified that Vault should prompt me for repository selection. I have defined one profile only and I am always using Vault from the same machine. No other users use this machine (my laptop).

However, sometimes when I start my Vault Client the "Automatically connect using this profile" field has been cleared and hence I am prompted to select a profile - actually all I have to do is to press OK, since the right (only) profile is already the selected profile.

So from Vault Client I experience that,
- I am prompted to select profile and then (of course) to select repository
- or sometimes - as it should be - I am only prompted to select repository

From Visual Studio (.Net 2003) it is even more weird. In the older versions of vault, apparently, the same login system was used in the Vault Client and Visual Studio. A little annoying maybe but at least always consistent.

Now, I experience two different scenarios
- I am prompted to select profile and then (of course) to select repository
- or somestimes - I am not prompted at all; I guess this is the correct
behaviour - at least Vault connects to the correct profile and repository

I have not been able to find a pattern and it does not seems to depend on which projects I open. It seems however, that the problem occurs if I have (or have had) both Visual Studio and Vault Client started at the same time, or have mutiple instances of Visual Studio started.



Regards,
The otherwise happy vault user
Hans Olav Nymand
Copenhagen

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Mon Jan 03, 2005 8:20 am

We've had other reports of this type of behavior

See this link:
http://support.sourcegear.com/viewtopic.php?t=2469

Is your problem similar to what was reported here? Is their any info in your source code or project files that could point to the problem?
Linda Bauer
SourceGear
Technical Support Manager

Hans Olav Nymand
Posts: 55
Joined: Wed Sep 29, 2004 8:09 am
Location: Denmark, Copenhagen
Contact:

Post by Hans Olav Nymand » Tue Jan 04, 2005 9:04 am

Dear Linda,

Yes, the link you provided partly solved my problem. Removing weird characters in .sln and .vcproj files, then unbinding and rebinding sourcecontrol from within Visual Studio solved the VS part of my problem.

Now when I open an existing VS.Net solution I am not prompted for either profile or repository. So far so good.

But my problem with Vault Client persists. Most times (but not always) when I start my Vault Client the "Automatically connect to profile" setting has been cleared, so I am prompted to select a profile. The correct profile is preselected though, so I can just press OK. After that - as I have requested - I am prompted to select the repository.

I am an administrator of my machine. I've even checked the registry and \HKEY_CURRENT_USER\Software\SourceGear\Vault\Client\Settings\AutomaticLogin is set to "True"



Regards,
Hans Olav Nymand

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Wed Jan 05, 2005 9:10 am

Intermittent behavior is hard to pin down.

Do you have more than one profile?

Verify that "Remember password" and "automatically choose this repository" are checked for each profile, and that the password is correct.

When the "Automatically connect using this profile" box comes up unchecked for the profile you connected to automatically for the previous login, check the registry again for the values for AutomaticLogin, LastProfile and LastUsername to see if they are consistent with the profile you're trying to connect with.
Linda Bauer
SourceGear
Technical Support Manager

Hans Olav Nymand
Posts: 55
Joined: Wed Sep 29, 2004 8:09 am
Location: Denmark, Copenhagen
Contact:

Still a problem

Post by Hans Olav Nymand » Fri Jan 28, 2005 8:27 am

Hi,

[Using 3.0.2 now]

There are still some problems with the "Automatically connect using this profile" (ACUP) setting, which I normally have disabled.

Part of the problems were solved when I fixed the content of .vcproj nd .sln files in Visual Studio. If I work only with the Vault Client and
only with VS.Net projects that are already bound to Vault in a correct way, there are no problems.

But, else, there are two issues.
1) One thing I don't understand, even though it may be by design is the following. ACUP is disabled when and if VS.Net decides to ask for which profile to use. I can understand this; it is by design. But why does VS.Net in this case always choose to act as if ACUP = False ?? Even though the setting is disabled (or in the future even absent) it should still log on
automatically if that is what I have asked for?

2) The other thing is clearly an error. When VS.Net prompts me for a profile (and acts as if ACUP = False), it also - de facto - clears the setting,
so next time I open the Vault Client I am also prompted to select a profile.
In the vault client of course ACUP is selectable (not disabled), but is it not checked even though the registry value is set to true!! This must be an error.


Regards,
Hans Olav Nymand
Prolog Development Center A/S

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Fri Jan 28, 2005 9:07 am

Yes, the GUI client should not change the last profile it connected with based on what happened in the IDE. I'll add that as a bug.

However, your root problem is that the IDE keeps popping up the dialog even though you've correctly chosen a profile. Does that profile have anything incorrect in it (such as a bad password, or the "do not save password" checked)? Can you connect using that profile in the GUI client?

You might check the MSSCCPRJ.SCC file associated with the project/solution and make sure the profile info there is correct. See http://support.sourcegear.com/viewtopic.php?t=2474 for an explanation of how to change those files if they are wrong.

paul sykes

Automatically connect bug

Post by paul sykes » Wed Feb 09, 2005 6:15 am

Hi Dan,

Just to clarify the IDE and GUI interaction...

If I choose,
"Source Control->Open From Source Control" or
"Source Control->Add Project From Source Control"

The IDE (devenv.exe) *only ever* makes the following queries to the Vault registry settings,

QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\LastUsername SUCCESS "psykes"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\LastUsername SUCCESS "psykes"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\LastUsername SUCCESS "psykes"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\LastUsername SUCCESS "psykes"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\LastURLBase SUCCESS "http://vault.dlgroup.com/VaultService"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\LastURLBase SUCCESS "http://vault.dlgroup.com/VaultService"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\LastURLBase SUCCESS "http://vault.dlgroup.com/VaultService"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\LastURLBase SUCCESS "http://vault.dlgroup.com/VaultService"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ServiceString SUCCESS "/VaultService"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ServiceString SUCCESS "/VaultService"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ServiceString SUCCESS "/VaultService"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ServiceString SUCCESS "/VaultService"

However when I okay that dialog, having reselected my profile, it writes the following settings back to the registry,

QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\LastProfileName SUCCESS "Me2"
SetValue HKCU\Software\SourceGear\Vault\Client\Settings\LastProfileName SUCCESS "Me2"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\LastURLBase SUCCESS "http://vault.dlgroup.com/VaultService"
SetValue HKCU\Software\SourceGear\Vault\Client\Settings\LastURLBase SUCCESS "http://vault.dlgroup.com/VaultService"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\LastUsername SUCCESS "psykes"
SetValue HKCU\Software\SourceGear\Vault\Client\Settings\LastUsername SUCCESS "psykes"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\AutomaticLogin SUCCESS "True"
SetValue HKCU\Software\SourceGear\Vault\Client\Settings\AutomaticLogin SUCCESS "False"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ProxySetting SUCCESS "0"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ProxySetting SUCCESS "0"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ProxySetting SUCCESS "0"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ProxySetting SUCCESS "0"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ProxyManualServer SUCCESS ""
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ProxyManualServer SUCCESS ""
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ProxyManualServer SUCCESS ""
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ProxyManualServer SUCCESS ""
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ProxyManualPort SUCCESS ""
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ProxyManualPort SUCCESS ""
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ProxyManualPort SUCCESS ""
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\ProxyManualPort SUCCESS ""
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\LastProfileName SUCCESS "Me2"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\LastProfileName SUCCESS "Me2"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\LastProfileName SUCCESS "Me2"
QueryValue HKCU\Software\SourceGear\Vault\Client\Settings\LastProfileName SUCCESS "Me2"

Since I cannot check "Automatically Connect" as it is grayed out, the setting is overridden and I get prompted next time I go into the GUI!


Paul Sykes
Dealogic

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Wed Feb 09, 2005 8:16 am

This only happens on "Open From" and "Add to" operations in the GUI right?

What happens is that those operations bring up the login dialog, and in doing so, cause the GUI client to choose the last login info selected (from the IDE) the next time it comes up, which is the bug. We need to decouple what happens in the IDE from the default login info selected by the GUI client.

paul sykes

Automatically connect bug

Post by paul sykes » Thu Feb 10, 2005 4:01 am

Hi Dan,

>This only happens on "Open From" and "Add to" operations in the GUI right?

Actually the main one I've realised is that every night my session somehow gets invalidated and so as soon as I next try to do something SCC related in the IDE I get the dialog,

"Session is no longer valid. Either the server restarted, or your session timed out. You must login to re-authenticate."


Once I click OK I am prompted to choose a profile and this of course leads to the "Automatically login" flag being overwritten.

Is it possible to increase the session timeout? I am fairly sure the server is not being restarted.


Thanks

Paul Sykes
Dealogic

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Thu Feb 10, 2005 8:45 am

It is probably the session time out. Check the admin tool Server Options tab for the server timeout. If the server is running Win2k3, it is more complicated because IIS6 is very aggressive in timing out sessions. See http://support.sourcegear.com/viewtopic.php?t=1014 for more info on Win2k3 timeouts.

Post Reply