index > Team Foundation Server - Administration > Changes in behavior of the DomainProjectPicker control in the TFS...

Changes in behavior of the DomainProjectPicker control in the TFS...


The behavior of the DomainProjectPicker control seems to have changed in the RC, and I want to understand the best way to handle it. I have been using this control in a standalone application that uses the TFS OM for months now to allow clients to choose a server and project, etc. The problem is, in the RC - due to what I assume are changes related to what you are discussing in this thread - the user is no longer prompted with the same credentials dialog (the one that allowed you to save your password.) Instead, they receive an error message when the DomainProjectPicker control's ShowDialog() method is called. I have read that the credentials management has indeed changed in the RC and that one should use the Control Panel's User Account applet's 'Manage my Network Passwords' feature (on XP) to get the same behavior that Beta 3 showed.

My server is on a workgroup (currently just named WORKGROUP), users may or may not be on a domain, AD or not.

Here's what happened in Beta 3:

ShowDialog was called on the DomainProjectPicker, and the 'Connect to Team Foundation Server' dialog came up. If the user had not previously authenticated or cached their credentials, they were prompted with the credentials dialog mentioned above. IF they saved their password, they were never prompted again for connections to this server.

In the RC, however, I (or the user) ALWAYS receive the following error message (assuming they have not cached a password in the Control Panel) when ShowDialog is called:

---------------------------
Team Foundation Server
---------------------------
TF31003: Your user account does not have permission to connect to the Team Foundation Server mhtsctfsrc. Contact your Team Foundation Server administrator and request that the appropriate permission be added to your account.
---------------------------
OK
---------------------------

Note that I NEVER receive a prompt for credentials...

DBGVIEW shows:

[3120] TFS::Authenticate : Caught exception : Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException: TF30063: You are not authorized to access mhtsctfsrc.
[3120] at Microsoft.TeamFoundation.Client.TeamFoundationSoapProxy.ThrowIfUnauthorized(HttpWebResponse response)
[3120] at Microsoft.TeamFoundation.Client.TeamFoundationSoapProxy.GetWebResponse(WebRequest request)
[3120] at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
[3120] at Microsoft.TeamFoundation.Client.CheckAuthenticationProxy.CheckAuthentication()
[3120] at Microsoft.TeamFoundation.Client.TeamFoundationServer.Authenticate(Boolean useProvider, ICredentialsProvider provider)

To get around it, I do the following:

[1] I click OK on the error message box
[2] I get a 'Connect to Team Foundation Server' dialog with my server name in the Servers dropdown list, and no projects listed below it in the 'Team Projects' list
[3] I click the 'Servers' button, the 'Add/Remove Team Foundation Server' dialog comes up
[4] I try to add the same server to the list via the 'Add' button
[5] NOW I get a credentials prompt, but one WITHOUT the 'save password' option that was there < RC
Devil type user and password, hit Enter
[7] I get:
---------------------------
Team Foundation Server Exists
---------------------------
Team Foundation Server '[my server]' already exists.
---------------------------
OK
---------------------------
Music So, I remove the server using the Remove button
[9] the server is removed
[10] I add the exact same server back
[11] I do NOT get a credentials prompt this time
[12] the server is added to the list successfully
[13] I click Close on the 'Add/Remove Team Foundation Server' dialog
[14] Now, the Projects ARE filled in 'Team Projects' list and I can interact with the server as I did in Beta 3.
[15] I have to do this EVERY TIME I RUN MY APP (well the removing and then re-adding the server part).

This seems kind of strange from a usage standpoint, especially since there is no indication to users (like a credentials prompt from the start) that they need to manually store their network password information for the server outside of the application using the Control Panel.

So, bottom line, the questions:

[1] Is there any way to get a credentials prompt for the server when using the DomainProjectPicker control like in Beta 3? I don't care that the new credentials dialog does not allow them to save their password, but getting an error message instead of simply prompting them for credentials every time seems incorrect and is causing a lot of confusion and discontent for my users who view it as a bug in my application.

[2] Should I be populating the 'Connect to Team Foundation Server' dialog manually? Is there any programmatic way to get around this problem via use of the TeamFoundationServer ctor or TeamFoundationServerFactory to do it so that users are prompted instead of getting error messages?

Thanks, and I apologize for the book of a post or if I have missed something obvious.

Cappy Popp
Cappy Popp
Any status, update, comment on this issue?
Cappy Popp

I have a similar problem. I have 2 machines in workgroup mode (non AD). If I run the following code from the client machine, it crashes:

>>>

DomainProjectPicker pjPicker =
new DomainProjectPicker(DomainProjectPickerMode.AllowProjectSelect); ;

pjPicker.ShowDialog();

<<<

Thanks in advance.

jamil
I've contacted one of the owners of this code - you should get some help shortly.


Your friendly neighborhood hippie
Tim Noonan MSFT

Hi Cappy,

Sorry for the late reply. The problem you experienced seems to be a bug introduced in TFS RC. Currently we don't have a good workaround for the problem and we are very sorry for that. We are working on a fix for the next release.

Jamil, the crashes you mentioned aren't related to the problem Cappy reported. If you still experienced the crash, could you capture the callstack?




Patrick Ng - Visual Studio Team Foundation Server
Patrick Ng - MSFT

I just came across this thread through searching the web...

You can get around it by authenticating to the servers in the list prior to calling the dialog:

//first, make sure we are authenticated with all the servers (as this may be the first time we launch).

foreach (string server in RegisteredServers.GetServerNames())
{
try
{
TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer(server, new UICredentialsProvider());
}
catch (Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException uaex)
{
// Handle the exception here...

}
}

Joe Buys
reply 6

You can use google to search for other answers

 

More Articles

AdminProjectRights problem
Moved Servers - Keep Workspace
Rename my projects
Project Portals stop working after restoring TFS from backups
Proxy only connection
TFS Migration to a new server
Failed to create team project
Migrate to another server
How do I keep TFS services up all the time? Application event 90...
Old version of document lost in project portal
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

TFS Migration to a new server
TFS Permissions
Project Alert Administration
Domain group members do not propagate to…
project alert email subject line
TF50612 Couldn't Remove Permissions for …
Failed to create team project
tfssecurity syntax question
view tasks from team explorer at the pro…
domain administrator password lock autom…
Team Explorer - red cross on "docum…
Microsoft Project Plan (.mpp file) in Pr…
Problem running TFSDeleteProejct
error when creating a new project in TFS
Restore TFS to a different server

Hot Articles

Change SQL Connection String.
How do I check search for All files that…
User adding problem
Saving Document
Cannot connect to TFS
TFS Migration to a new server
Creating / Modifying Alerts
Sharepoint - Link child schedules (MS Pr…
Domain group members do not propagate to…
How to sort the Library name in Quick La…
Restore-move but re-create Sharepoint
Random server 400 errors
SOAP Exception while connecting to TFS p…
permission problem ..
Problem with adding new user to group me…

Recommend Articles

tempdb size
Add/Change graphic on Project Portal
Help with Team Foundation Server
Registration Service
TeamSystem access via HTTP and HTTPS
Notification on New Work Item
Error unable to connect to the remote se…
Sharepoint project lost
Adding user from different domain to TFS…
Does TFS send alerts/notifications? if s…
CheckinEvent Alerts not being sent
Converting tasks from one project to ano…
Team Server security and VPN
Unable to save public query
Can we mange the notification for all th…