TFS – “The path … is already mapped in workspace …”

February 24, 2012

After installing some power too, my VS 2010 now always run under another admin account of me. So my previous mapping of the projects are lost and I can’t check out files to the original local path. The above error occurs if I try to remap the project to the same location. After some googling these tips helps:

In VS command line, use

  • c:\>tf workspaces /owner:*  (to show all workspace)
  • c:\>tf workspace /delete COMPUTER_NAME;USER_NAME (to remove the workspace)
  • c:\>tf workspace COMPUTER;USERNAME (this will open a GUI dialog to edit the workspace. The BEST option!)

I change my workspace to public so that any user can work on it (in case my VS switches back to my own account).


SQL command always times out after 30 seconds

February 22, 2012

One of my query takes more than 30 seconds to run. Even I set the “Connection Timeout=120″ in my connection string, it still throwing timed out exception. It turned out that the time out setting in the connection string is only for setting up the connection (as the name implies). To change the default 30 seconds time out for each individual database call, I need to set it on the SqlCommand object:

sqlCmd.CommandTimeout = 120; // 2 minutes


Follow

Get every new post delivered to your Inbox.