Team Foundation Server Beta3(TFS)中關於連接和用戶驗證的bug以及解決方案(TFS高手進)

Team Foundation Server Beta3(TFS)中關於連接和用戶驗證的bug以及解決方案(TFS高手進)

    
    最近一個項目,
XP操作系統中使用VS2005連接Team Foundation Server進行源碼管理和控制。我在使用當中碰到了一個嚴重問題,和大家分享經歷,希望能幫助有同樣問題的朋友,更希望有高手能給出更好的解決方案,大家交流一下。

      

    問題描述:

我用的是TFS客戶端,要連接服務器端,獲取源碼。

1.  打開tool菜單,選擇Connect to Team Foundation Server….

2.  然後按照提示輸入服務器地址和你要選擇的項目。

3.  問題就在這裏,這時候會出現用戶登陸驗證框,要求你輸入用戶名和密碼,如圖,當你選擇保存用戶名和密碼後,你會發現你將再也無法修改這個用戶名和密碼,由於我當初是使用別人的帳號登陸的,現在要改回自己的帳號實在費了一番心血。(強烈建議,千萬別記住用戶名和密碼!!!!!)

4.   已經添加的服務器無法斷開連接。 

 

 

 

從微軟論壇上找到的資料

1

QCan not disconnect from TFS Server in explorer window

      Was this post helpful ?     

When i started a connection (Studio 2005) the first time after the upgrade to TFS Beta 3 Refresh no login was prompted when connected to the FTS server. I was loged on as administrator.

I can not find a way to disconnect from the server and login as another user (myself). When I disconnect I receive an error saying

Value can not be null.

Parameter name : uriString

 

A1

Thomas, this bug has been logged and fixed in RTM. You can try "Devenv /resetuserdata" that would reset VS and then start connecting to the server again. I will also check to see if there are other workarounds.

 

A2

I did that!

I have uninstall VS2005 + install VS2005

I ran "devenv /resetuserdata" and the the VS2005 started as first time (as it should).

When I connected to TFServer I had to re-add the TFserver again.

Everything went just fine but no login popup and the connection to TFS is once again as administrator!

Please let me know how to switch to my normal login!

I've got a solution for users running XP.

Edit USer Accounts -> Advance -> Manage Passwords and remove the TFServer server/password!

Login again and you will be pronpted for user & password!

Best Regards,

Thomas

Can not have this to work the 2:nd time!!!!!

Studio will start as for the first time but no login is prompted and I am the same user as before and can access TFS.

Any suggestions how to reset this?

 

分析:

從上面的回答可以發現,有人重裝了VS2005都沒用,那就是說這個用戶名和密碼是存儲在XP系統中的,而且也提到了無法斷開連接這個目前知名的bug。

上面回答的人給出了一個解決方案,說是從user accounts進入,刪除掉那個密碼。在Xp我沒找到如何通過控制面板進入的方法,只有從開始運行輸入

rundll32 netplwiz.dll,UsersRunDll,打開用戶管理界面,如圖。但是顯然在其中並沒有A2所說的TFServer server/password,只能對此種方案表示放棄(誰知道的告訴我阿)

 

2

Q

Clean client cache - Want to login with a different user

  Was this post helpful ?     

       On client side, when opening VS it automatically logs in to team foundation server with the user I provided the first time. How do I connect with another user. The dialog does not display. I have tried Internet Explorer->Internet  Options->Security to prompt every time, but with no success.

I have also tried devenv.exe /resetuserdata

 

A1

In Visual Studio SDK there is a Visual Studio Team System Integration part which in the subfolder named "Utilities" hides three useful utilities. One of these utilities called "CleanCreds.exe" should do the trick. Here is a part of the readme.txt file for the utility:

CleanCreds.exe

--------------

This tool is used to delete stored credentials for Team Foundation Server connections.  It applies to the following scenario:

1. From the Team Explorer, connect to a Team Foundation Server for which the running account does not have permissions.

2. When prompted for alternate credentials, enter in alternate login and password and check the "Remember my password" checkbox

3. Confirm the alternate credentials and login to the server

4. Any future connection to that Team Foundation Server from this machine using the running account will use the alternate credentials.  There is no easy way to delete the stored alternate credentials.

This scenario is problematic in environments where the Team Explorer client machine is shared and alternate credentials are used frequently.

Clearing Credentials

To delete the stored credentials, use the CleanCreds.exe utility as follows.

1. Ensure that you have logged in to the client machine using the original running account

2. Copy the CleanCreds.exe to the client machine

3. From the command prompt, run:

     CleanCreds <Team Foundation Server URL>

   The URL usually looks as follows:

     http://TFS:8080/

This will delete the alternate credentials stored for the running account for connecting to the specified Team Foundation Server.

      

A2

You should also be able to do this by executing some command with the tf.exe command line.  The command-line supports a /login option where you can specify a user name.  That will pull up the credentials dialog and allow you to save new credentials.

 

分析:

在這個解決方案中,提到了使用CleanCreds.exe這個程序,可以清除密碼,本來我以爲事情就這麼順利解決了,可是沒想到無論從google或者baidu或者自己的電腦中,都無法找到關於CleanCreds.exe這個程序的任何相關資料,我也嘗試到MSDN中去搜索,依然是一無所獲,後來我嘗試查找A2中的tf.exe,首先這個程序能從VS2005中輕鬆找到,是個命令行程序,用DOS打開,鍵入tf.exe -?後會自動打開MSDN中相關內容,看了後就是沒找到A2中提到的/login參數,何解?放棄該方案。

 

最終解決方案:

        以上解決方案最終都沒成功,最後是我一個同事問到了微軟的人才最後解決的,說解決其實不恰當,其實是繞過了這個問題。

        不要雙擊,Visuao Studio 2005的快捷方式。用鼠標點右鍵!選擇運行方式

出現如下圖,換一種系統帳戶登陸(如沒有,需要新建一個用戶),確定!

重新設置TFS,用你想要登陸的用戶名登陸!!

        這就等於是換了個用戶使用,這種方法帶來的問題是,下次直接使用項目登陸是不能默認登陸爲更改後的帳戶的,必須每次都右鍵通過運行方式改變用戶登陸,再打開需要編輯的解決方案,非常麻煩。但是能夠暫時解決問題。

 

 

 

 

  結論:這裏提出的可以說是一種暫時的解決方案,期待微軟能在下一個版本中解決這個bug,包括對連接上的服務器無法斷開的bug。期待高手能給出更好的解決方案。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章