Showing posts with label tfs2010. Show all posts
Showing posts with label tfs2010. Show all posts

Wednesday, October 3, 2012

TFS WebAccess Error: [HttpException (0x80004005): Unable to validate data

We were getting the following error while setting our TFS2010 Web access. Sharing the solution which worked for us, might be useful for you.

Error:
[HttpException (0x80004005): Unable to validate data


Solution:
1. On App Tier server, goto C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Access\Web.
    (Please make a copy of Web.config, just in case you need the original file later.)

2. Edit the Web.config file in notepad.
3. Search "machineKey" in Web.config file.
4. Replace the <machineKey> section with following.
<machineKey validationKey="AutoGenerate,IsolateApps" decryptionKey="AutoGenerate,IsolateApps" validation="3DES" decryption="3DES"/>
5. Save the Web.config file.
6. Restart the Microsoft Internet Information Services (IIS) service.

Wednesday, October 12, 2011

How to get TFS Project groups and members information using TFS2010 APIs ?

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

using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.Server;
using Microsoft.TeamFoundation.VersionControl.Client;

 
public void PrintTFSGroupMembersInfo()
        {
            TfsTeamProjectCollection proj_coll = new TfsTeamProjectCollection(new Uri("http://NvnTFSServer:8080/tfs/defaultcollection/"), new System.Net.NetworkCredential(username, pass));
            proj_coll.Authenticate();

            VersionControlServer vcs = (VersionControlServer)proj_coll.GetService(typeof(VersionControlServer));
            TeamProject[] TPs = vcs.GetAllTeamProjects(false);

            IGroupSecurityService sec_groups = (IGroupSecurityService)proj_coll.GetService(typeof(IGroupSecurityService));


            foreach (TeamProject TP in TPs)
            {
                Console.WriteLine("Team Project : " + TP.Name);
                Console.WriteLine("Group Members : ");

                Identity[] app_groups = sec_groups.ListApplicationGroups(TP.ArtifactUri.ToString());

                foreach (Identity app_grp in app_groups)
                {
                    Identity grp = sec_groups.ReadIdentity(SearchFactor.Sid, app_grp.Sid, QueryMembership.Direct);

                    foreach (string members in grp.Members)
                    {
                        Identity member = sec_groups.ReadIdentity(SearchFactor.Sid, members, QueryMembership.Direct);

                        Console.WriteLine("     " + member.DisplayName);
                        foreach (string mm in member.Members)
                        {
                            Identity m = sec_groups.ReadIdentity(SearchFactor.Sid, mm, QueryMembership.Direct);

                            Console.WriteLine("         " + m.DisplayName);
                        }
                    }
                }


            }
        }

Friday, September 9, 2011

TFS 2010 Training Kit Released

This is for all who are interested in learning TFS 2010. Microsoft has recently released the TFS 2010 Training Kit. You can download the TFS 2010 Training Kit by clicking on the link given below.  The training kit is very well designed, authored by Yuval Mazor and Asaf Stone. This training kit is really useful for all developers, testers, managers and all other in team.

This Training Kit contains several demos and hands-on labs that require some additional setup. For instructions, please see the Setup document.