WorkItemStore.Projects returning Value does not fall within the expected range
- Not sure if this is the correct forum, so please direct me if it's not.
We are using TFS 2005, and I have written code that allows us to automatically create bugs when different events happen. This code has been running exceptionally well for the last year. All of a sudden I am getting the error messageValue does not fall within the expected range. at Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.HandleComException
When I set a breakpoint, the Project collection has this error message. Very strange.
Dim ProjectName As String = "My Project"
Dim tfs As New TeamFoundationServer("http://tfs001:8080/", New Net.NetworkCredential("username", "password", "domain"))
tfs.Authenticate()
Dim store As WorkItemStore = CType(tfs.GetService(GetType(Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore)), Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore)
Dim selectedProject As Project = Nothing
For Each st As Project In store.Projects
If st.Name.Trim.ToLower = ProjectName.Trim.ToLower Then
selectedProject = st
Exit For
End If
Next
Thanks!
Jeff
Answers
Hi Jeff,
Thanks for reporting this issue.
There is a similar known issue which occurs due to corupted cache in TFS server. Please have a try of the following actions:
1. Delete folder in TFS server C:\Users\APPPOOL IDENTITY\AppData\Local\Microsoft\Team Foundation\2.0\Cache
2. Recycle app pool in TFS server
3. Delete TFS client cache: http://blogs.msdn.com/mohamedg/archive/2009/03/09/error-an-item-with-the-same-key-has-already-been-added.aspx
If these steps don't solve your problem, please copy the call stack of the code when the exception occured. Thanks.
Hongye Sun [MSFT]
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg @ microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Marked As Answer byHongye SunMSFT, ModeratorTuesday, November 17, 2009 9:53 AM
All Replies
Hi Jeff,
Thanks for reporting this issue.
There is a similar known issue which occurs due to corupted cache in TFS server. Please have a try of the following actions:
1. Delete folder in TFS server C:\Users\APPPOOL IDENTITY\AppData\Local\Microsoft\Team Foundation\2.0\Cache
2. Recycle app pool in TFS server
3. Delete TFS client cache: http://blogs.msdn.com/mohamedg/archive/2009/03/09/error-an-item-with-the-same-key-has-already-been-added.aspx
If these steps don't solve your problem, please copy the call stack of the code when the exception occured. Thanks.
Hongye Sun [MSFT]
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg @ microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Marked As Answer byHongye SunMSFT, ModeratorTuesday, November 17, 2009 9:53 AM
- Hello Jeff,
Is this issue resolved?
Hongye Sun [MSFT]
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg @ microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.


