Getting TF400324: Team Foundation services are not available from server http://[servername]:8080/tfs/ error when trying to iterate through project names in collection


hi,

we have 2 instances of tfs 2012 on 2 different servers, server1 , server2 simplicity. server1 new installation of tfs2012 , few agile projects created under defaultcollection collection, no projects brought instance, created straight scratch. server hosts tfs2012 build agent.

server2 new installation of tfs2012, however, on server collection , projects created using upgrade method move projects tfs2008 directly tfs2012 (no tfs2010 in between). http://server2:8080/tfs/testupgrade is main url upgraded collection.

now, test listing projects in collection, i'm using small console application, difference url provided project names from. below main logic on how i'm fetching project names. main results when use http://server1:8080/tfs/ url project names from, have no errors logic below , works fine. if use http://server2:8080/tfs/ url, logic when using configurationserver method displays project names. second method, using tfsteamprojectcollection, throws error in title of question when hit line "_workitemstore = _tfsserver.getservice<workitemstore>();". though i'm not using this _workitemstore variable in program, i'm simulating the initialization of these objects make sure project have works fine.

i wondering if there setting/configuration issue on server2 might causing error. ideas? thanks!

here's logic:

namespace collectiontester
{
    class program
    {
        static void main(string[] args)
        {
            ibuildserver buildserver;

            // connect team foundation server
            //     server name of server running application tier team foundation.
            //     port port team foundation uses. default port 8080.
            //     vdir virtual path team foundation application. default path tfs.
            uri tfsuri = (args.length < 1) ?
                new uri("http://{server1|server2}:8080/tfs/") : new uri(args[0]);

            tfsconfigurationserver configurationserver =
                tfsconfigurationserverfactory.getconfigurationserver(tfsuri);

            // catalog of team project collections
            readonlycollection<catalognode> collectionnodes = configurationserver.catalognode.querychildren(
                new[] { catalogresourcetypes.projectcollection },
                false, catalogqueryoptions.none);

            // list team project collections
            foreach (catalognode collectionnode in collectionnodes)
            {
                // use instanceid property team project collection
                guid collectionid = new guid(collectionnode.resource.properties["instanceid"]);
                tfsteamprojectcollection teamprojectcollection = configurationserver.getteamprojectcollection(collectionid);

                // print name of team project collection
                console.writeline("collection: " + teamprojectcollection.name);

                // catalog of team projects collection
                readonlycollection<catalognode> projectnodes = collectionnode.querychildren(
                    new[] { catalogresourcetypes.teamproject },
                    false, catalogqueryoptions.none);

                // list team projects in collection
                foreach (catalognode projectnode in projectnodes)
                {
                    console.writeline(" team project: " + projectnode.resource.displayname);
                    buildserver = (ibuildserver)teamprojectcollection.getservice(typeof(ibuildserver));
                    ibuilddefinition[] builddefinitions =
                        buildserver.querybuilddefinitions(projectnode.resource.displayname);
                    foreach (ibuilddefinition builddefinition in builddefinitions)
                    {
                        console.writeline("\tbuild definition: " + builddefinition.name);

                    }
                }
            }

            console.write("press enter continue...");
            console.readline();

            workitemstore _workitemstore;
            tfsteamprojectcollection _tfsserver;
            versioncontrolserver _versioncontrolserver;
            project _teamproject;

            _tfsserver = tfsteamprojectcollectionfactory.getteamprojectcollection(tfsuri);
            _workitemstore = _tfsserver.getservice<workitemstore>();
            _versioncontrolserver = _tfsserver.getservice<versioncontrolserver>();


            readonlycollection<catalognode> projectnodeslist =
                _tfsserver.catalognode.querychildren(new[] { catalogresourcetypes.teamproject }, false,
                                                     catalogqueryoptions.none);

            foreach (catalognode projectnode in projectnodeslist)
            {
                {
                    console.writeline("projectnode.resource.displayname: " + projectnode.resource.displayname);
                }
            }
            console.write("press enter finish...");
            console.readline();

        }
    }
}


alex islas-montantes

we able past error clearing cache stored in local box team foundation. flipping between versions of tfs (test , prod) permissions being cached @ times.

alex islas-montantes



Archived Forums V  >  Team Foundation Server - Build and release management



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........