{"id":4963,"date":"2005-06-29T22:56:00","date_gmt":"2005-06-29T22:56:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/buckh\/2005\/06\/29\/tfs-source-control-administration-web-service\/"},"modified":"2005-06-29T22:56:00","modified_gmt":"2005-06-29T22:56:00","slug":"tfs-source-control-administration-web-service","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/buckh\/tfs-source-control-administration-web-service\/","title":{"rendered":"TFS Source Control administration web service"},"content":{"rendered":"<p>Have you ever wondered how many files are in your server?&nbsp; Or workspaces?&nbsp; Have you wanted to stop a request that was being processed?&nbsp; Using the administration web service and matching web page for TFS Source Control, you can do exactly that.<\/p>\n<p>For a beta 2 server,&nbsp;bring up <a href=\"http:\/\/localhost:8080\/scc\/application\/admin.asmx\">http:\/\/localhost:8080\/scc\/application\/admin.asmx<\/a>&nbsp;in Internet Explorer (either run IE on the application tier or replace localhost with the name of the server).&nbsp; For the upcoming mid-July CTP server, bring up <a href=\"http:\/\/localhost:8080\/SourceControl\/Application\/Administration.asmx\">http:\/\/localhost:8080\/SourceControl\/Application\/Administration.asmx<\/a>&nbsp;(yep, longer name and more capital letters).<\/p>\n<p>Since we&#8217;re close to the upcoming mid-July CTP, I&#8217;m going use it in the examples.<\/p>\n<p>When you bring up the web page, you&#8217;ll see links for the web methods that are available.&nbsp; You can run these in Internet Explorer, or you can write code in VS 2005 to call the web service methods from an application.&nbsp; Here&nbsp;is what&nbsp;you&#8217;ll see.<\/p>\n<blockquote>\n<p class=\"heading1\"><strong>Admin<\/strong><span><\/span><\/p>\n<p class=\"intro\">Team Foundation VersionControl Admin web service<\/p>\n<p><span><\/p>\n<p class=\"intro\">The following operations are supported. For a formal definition, please review the <a href=\"http:\/\/localhost:8080\/SourceControl\/Application\/Administration.asmx?WSDL\"><strong><font color=\"#336699\">Service Description<\/font><\/strong><\/a>. <\/p>\n<p><\/span><\/p><\/blockquote>\n<ul>\n<ul>\n<li><a href=\"http:\/\/localhost:8080\/SourceControl\/Application\/Administration.asmx?op=ChangeServerLogState\"><strong><font color=\"#336699\">ChangeServerLogState<\/font><\/strong><\/a> \n<\/p>\n<\/li>\n<li><a href=\"http:\/\/localhost:8080\/SourceControl\/Application\/Administration.asmx?op=ChangeServerState\"><strong><font color=\"#336699\">ChangeServerState<\/font><\/strong><\/a> \n<\/p>\n<\/li>\n<li><a href=\"http:\/\/localhost:8080\/SourceControl\/Application\/Administration.asmx?op=GenerateRepositoryKey\"><strong><font color=\"#336699\">GenerateRepositoryKey<\/font><\/strong><\/a> \n<\/p>\n<\/li>\n<li><a href=\"http:\/\/localhost:8080\/SourceControl\/Application\/Administration.asmx?op=KillProcess\"><strong><font color=\"#336699\">KillProcess<\/font><\/strong><\/a> \n<\/p>\n<\/li>\n<li><a href=\"http:\/\/localhost:8080\/SourceControl\/Application\/Administration.asmx?op=OptimizeDatabase\"><strong><font color=\"#336699\">OptimizeDatabase<\/font><\/strong><\/a> \n<\/p>\n<\/li>\n<li><a href=\"http:\/\/localhost:8080\/SourceControl\/Application\/Administration.asmx?op=QueryRepositoryInformation\"><strong><font color=\"#336699\">QueryRepositoryInformation<\/font><\/strong><\/a> \n<\/p>\n<\/li>\n<li><a href=\"http:\/\/localhost:8080\/SourceControl\/Application\/Administration.asmx?op=QueryServerInformation\"><strong><font color=\"#336699\">QueryServerInformation<\/font><\/strong><\/a> \n<\/p>\n<\/li>\n<li><a href=\"http:\/\/localhost:8080\/SourceControl\/Application\/Administration.asmx?op=QueryServerRequests\"><strong><font color=\"#336699\">QueryServerRequests<\/font><\/strong><\/a> \n<\/p>\n<\/li>\n<\/ul>\n<ul>\n<li><a href=\"http:\/\/localhost:8080\/SourceControl\/Application\/Administration.asmx?op=QueryServerRequestsWithDetails\"><strong><font color=\"#336699\">QueryServerRequestsWithDetails<\/font><\/strong><\/a> <\/li>\n<\/ul>\n<\/ul>\n<p>If you click on QueryRepositoryInformation and then click the Invoke button, you&#8217;ll see how many files, workspaces, and so forth that are on the server.&nbsp; For my current development server, I see the following.<\/p>\n<blockquote>\n<p><font color=\"#0000ff\"><span class=\"m\">&lt;?<\/span><span class=\"pi\">xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243; <\/span><span class=\"m\">?&gt;<\/span><\/font>&nbsp;<br> <span class=\"m\"><font color=\"#0000ff\">&lt;<\/font><\/span><span class=\"t\"><font color=\"#990000\">AdminRepositoryInfo<\/font><\/span> <span class=\"ns\"><font color=\"#ff0000\">xmlns:xsi<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b class=\"ns\"><font color=\"#ff0000\">http:\/\/www.w3.org\/2001\/XMLSchema-instance<\/font><\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"ns\"><font color=\"#ff0000\"> xmlns:xsd<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b class=\"ns\"><font color=\"#ff0000\">http:\/\/www.w3.org\/2001\/XMLSchema<\/font><\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> UserCount<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>1<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> GroupCount<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>6<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> WorkspaceCount<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>2<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> ShelvesetCount<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>1<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> FileCount<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>2487<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> FolderCount<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>27<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> MaxChangesetID<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>3<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> PendingChangeCount<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>12<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"ns\"><font color=\"#ff0000\"> xmlns<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b class=\"ns\"><font color=\"#ff0000\">http:\/\/schemas.microsoft.com\/TeamFoundation\/2005\/06\/VersionControl\/Admin\/02<\/font><\/b><font color=\"#0000ff\"><span class=\"m\">&#8220;<\/span><span class=\"m\"> \/&gt;<\/span><\/font> <\/p>\n<\/blockquote>\n<p>From this you can see that I&#8217;m the only user (UserCount = 1).&nbsp; There are six groups defined (GroupCount = 6). &nbsp;I have created two workspaces&nbsp;(WorkspaceCount = 2) and one shevleset (ShelvesetCount = 1).&nbsp; On a beta 2 server, the workspace and shelveset counts are lumped together in the workspace count.&nbsp; There are currently 2487 files in 27 directories checked into the server&nbsp;(FileCount = 2487 and FolderCount = 27).&nbsp; I&#8217;ve only checked in twice since the server was created (MaxChangesetID = 3, and the first changeset is always the creation of $\/ when the server is installed).<\/p>\n<p>The last number is the number of pending changes.&nbsp; It says that there are 12 pending changes on the server (PendingChangeCount = 12).&nbsp; However, six of those pending changes are in one of my workspaces, and the other six are in the one shelveset I&#8217;ve created.&nbsp; So, as your users make use of shelving, you&#8217;ll see your pending change count climb quite a bit.<\/p>\n<p>You can create a quick shortcut to the repository info page by using the URL you see in IE when you are looking at the XML data.&nbsp; In this case, it&#8217;s <a href=\"http:\/\/localhost:8080\/SourceControl\/Application\/Administration.asmx\/QueryRepositoryInformation\">http:\/\/localhost:8080\/SourceControl\/Application\/Administration.asmx\/QueryRepositoryInformation<\/a>.&nbsp; That gets you the result of clicking the Invoke button without having to click it.<\/p>\n<p>Clicking on QueryServerInformation will tell you how long your server has been running, the unique ID of the server, and a few other details.<\/p>\n<p>The ChangeServerState operation allows you to pause or stop the server.&nbsp; When you click on it, you&#8217;ll see a newServerState parameter and a comment parameter.&nbsp; The newServerState values are shown in the SOAP detail below the parameter boxes.&nbsp; The following lines from that description show what you can enter.<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;newServerState&gt;<font class=\"value\" color=\"#00008b\"><strong>Stopped<\/strong><\/font> or <font class=\"value\" color=\"#00008b\"><strong>Starting<\/strong><\/font> or <font class=\"value\" color=\"#00008b\"><strong>Running<\/strong><\/font> or <font class=\"value\" color=\"#00008b\"><strong>Paused<\/strong><\/font> or <font class=\"value\" color=\"#00008b\"><strong>Unknown<\/strong><\/font>&lt;\/newServerState&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;comment&gt;<font class=\"value\" color=\"#00008b\"><strong>string<\/strong><\/font>&lt;\/comment&gt;<br>So, if you enter Paused (be sure to type it with the exact casing you see, or you&#8217;ll get an error about the value being unknown) for newServerState and type in some text for a comment, the server will be Paused when you click Invoke.&nbsp; If it succeeds, you&#8217;ll see a blank window in IE, since we&#8217;re just using the feature of ASP.NET that allows you to interactively run the web methods, so it doesn&#8217;t give you anything back since the web method has no response, unlike QueryServerInformation.<\/p>\n<p>When I paused my server, I put in a comment of &#8220;For this demo.&#8221;&nbsp; Now, if you&#8217;ll go back to QueryServerInformation, you&#8217;ll see that your server is indeed paused (ServerState = Paused and Comment is whatever you typed).<\/p>\n<blockquote>\n<div class=\"e\"><font color=\"#0000ff\"><span class=\"m\">&lt;?<\/span><span class=\"pi\">xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243; <\/span><span class=\"m\">?&gt;<\/span><\/font> <\/div>\n<div class=\"e\">\n<div><span class=\"b\"><strong><font face=\"Courier New\" color=\"#ff0000\">&nbsp;<\/font><\/strong><\/span> <span class=\"m\"><font color=\"#0000ff\">&lt;<\/font><\/span><span class=\"t\"><font color=\"#990000\">AdminServerInfo<\/font><\/span> <span class=\"ns\"><font color=\"#ff0000\">xmlns:xsi<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b class=\"ns\"><font color=\"#ff0000\">http:\/\/www.w3.org\/2001\/XMLSchema-instance<\/font><\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"ns\"><font color=\"#ff0000\"> xmlns:xsd<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b class=\"ns\"><font color=\"#ff0000\">http:\/\/www.w3.org\/2001\/XMLSchema<\/font><\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> StartTime<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>2005-06-29T20:38:33.0581917Z<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> Uptime<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>06:49:58.2633623<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> ServerState<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>Paused<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> Comment<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>For this demo.<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> DateLastStateChange<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>2005-06-30T03:22:18.3Z<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> ServerLogState<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>None<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> LogComment<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>Administrative logging not enabled<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> LogDateLastStateChange<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>2005-06-29T20:34:06.053Z<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> RepositoryName<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>buckhHatteras<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> RepositoryId<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>97732cf6-ff08-455c-b0e5-b77ae02844fa<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"ns\"><font color=\"#ff0000\"> xmlns<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b class=\"ns\"><font color=\"#ff0000\">http:\/\/schemas.microsoft.com\/TeamFoundation\/2005\/06\/VersionControl\/Admin\/02<\/font><\/b><font color=\"#0000ff\"><span class=\"m\">&#8220;<\/span><span class=\"m\"> \/&gt;<\/span><\/font> <\/div>\n<\/div>\n<\/blockquote>\n<p>If you paused your server, now&#8217;s a good time to go back to ChangeServerState and set newServerState to Running.<\/p>\n<p>The QueryServerRequests page will show you the currently active server requests.&nbsp; When I invoke QueryServerRequests, I see the following.<\/p>\n<blockquote>\n<div class=\"e\"><font color=\"#0000ff\"><span class=\"m\">&lt;?<\/span><span class=\"pi\">xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243; <\/span><span class=\"m\">?&gt;<\/span><\/font> <br><span class=\"m\"><font color=\"#0000ff\">&lt;<\/font><\/span><span class=\"t\"><font color=\"#990000\">ArrayOfAnyType<\/font><\/span><span class=\"ns\"><font color=\"#ff0000\"> xmlns:xsi<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b class=\"ns\"><font color=\"#ff0000\">http:\/\/www.w3.org\/2001\/XMLSchema-instance<\/font><\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"ns\"><font color=\"#ff0000\"> xmlns:xsd<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b class=\"ns\"><font color=\"#ff0000\">http:\/\/www.w3.org\/2001\/XMLSchema<\/font><\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"ns\"><font color=\"#ff0000\"> xmlns<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b class=\"ns\"><font color=\"#ff0000\">http:\/\/schemas.microsoft.com\/TeamFoundation\/2005\/06\/VersionControl\/Admin\/02<\/font><\/b><font color=\"#0000ff\"><span class=\"m\">&#8220;<\/span><span class=\"m\">&gt;<\/span><\/font><\/div>\n<div class=\"e\">\n<div>\n<div class=\"e\">\n<div><span class=\"b\"><strong><font face=\"Courier New\" color=\"#ff0000\">&nbsp;<\/font><\/strong><\/span> <span class=\"m\"><font color=\"#0000ff\">&lt;<\/font><\/span><span class=\"t\"><font color=\"#990000\">anyType<\/font><\/span> <span class=\"t\"><font color=\"#990000\">xsi:type<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>AdminServerRequest<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> User<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>NORTHAMERICAbuckh<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> ServerProcessID<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>5978<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> StartTime<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>2005-06-30T03:36:11.5461948Z<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> StopTime<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>0001-01-01T00:00:00<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> InProgress<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>true<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> ExecutionTime<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>00:00:00.7343844<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> WebMethod<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>Get<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> RemoteComputerName<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>192.168.20.105<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> RemoteComputer<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>192.168.120.105<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> RemotePort<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>2519<\/b><font color=\"#0000ff\"><span class=\"m\">&#8220;<\/span><span class=\"m\"> \/&gt;<\/span><\/font> <\/div>\n<\/div>\n<div class=\"e\">\n<div><span class=\"b\"><strong><font face=\"Courier New\" color=\"#ff0000\">&nbsp;<\/font><\/strong><\/span> <span class=\"m\"><font color=\"#0000ff\">&lt;<\/font><\/span><span class=\"t\"><font color=\"#990000\">anyType<\/font><\/span> <span class=\"t\"><font color=\"#990000\">xsi:type<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>AdminServerRequest<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> User<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>NORTHAMERICAbuckh<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> ServerProcessID<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>5979<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> StartTime<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>2005-06-30T03:36:12.264954Z<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> StopTime<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>0001-01-01T00:00:00<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> InProgress<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>true<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> ExecutionTime<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>00:00:00.0156252<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> WebMethod<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>QueryServerRequests<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> RemoteComputerName<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>127.0.0.1<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> RemoteComputer<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>127.0.0.1<\/b><span class=\"m\"><font color=\"#0000ff\">&#8220;<\/font><\/span><span class=\"t\"><font color=\"#990000\"> RemotePort<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">=&#8221;<\/font><\/span><b>2464<\/b><font color=\"#0000ff\"><span class=\"m\">&#8220;<\/span><span class=\"m\"> \/&gt;<\/span><\/font> <\/div>\n<\/div>\n<div><span class=\"b\"><strong><font face=\"Courier New\" color=\"#ff0000\">&nbsp;<\/font><\/strong><\/span> <span class=\"m\"><font color=\"#0000ff\">&lt;\/<\/font><\/span><span class=\"t\"><font color=\"#990000\">ArrayOfAnyType<\/font><\/span><span class=\"m\"><font color=\"#0000ff\">&gt;<\/font><\/span><\/div>\n<\/div>\n<\/div>\n<\/blockquote>\n<p>I ran &#8220;h get&#8221; from a command prompt immediately before running QueryServerRequests.&nbsp; So, there are two requests active.&nbsp; The second one, WebMethod = QueryServerRequests, is my own requests to see the other requests.&nbsp; You&#8217;ll always see at least this entry.&nbsp; The first one is the result of my execution of &#8220;h get&#8221; from the command prompt.&nbsp; The client has called the Get web service on the server to get the latest files into my workspace.<\/p>\n<p>Earlier I mentioned being able to stop active server requests.&nbsp; The data returned by QueryServerRequests includes a ServerProcessID.&nbsp; In the data above, you can see that my Get web service request has ServerProcessID = 5978.<\/p>\n<p>If you go back to the main Admin web page and click on KillProcess, you can use this ServerProcessID you obtained from QueryServerRequests.&nbsp; KillProcess takes two parameters, serverProcessID and comment.&nbsp; For the serverProcessID, enter the ServerProcessID from the QueryServerRequests page for the request you want to stop.&nbsp; You can also enter a comment to describe why you are doing it.&nbsp; When you execute the method, the specified request will immediately be stopped, and an error will be returned to the caller.<\/p>\n<p>The OptimizeDatabase operation removes unreferenced content from the server.&nbsp; Unreferenced content is data that was uploaded to the server but is not referenced by any shelved change or committed file version.&nbsp; You don&#8217;t need to run this, as it&#8217;s run periodically (once per week, by default I believe).<\/p>\n<p>With QueryServerInformation and the other methods, you have more information about what&#8217;s going on with your server and the ability to change it.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever wondered how many files are in your server?&nbsp; Or workspaces?&nbsp; Have you wanted to stop a request that was being processed?&nbsp; Using the administration web service and matching web page for TFS Source Control, you can do exactly that. For a beta 2 server,&nbsp;bring up http:\/\/localhost:8080\/scc\/application\/admin.asmx&nbsp;in Internet Explorer (either run IE on [&hellip;]<\/p>\n","protected":false},"author":94,"featured_media":10268,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[6,8],"class_list":["post-4963","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-source-control","tag-team-foundation"],"acf":[],"blog_post_summary":"<p>Have you ever wondered how many files are in your server?&nbsp; Or workspaces?&nbsp; Have you wanted to stop a request that was being processed?&nbsp; Using the administration web service and matching web page for TFS Source Control, you can do exactly that. For a beta 2 server,&nbsp;bring up http:\/\/localhost:8080\/scc\/application\/admin.asmx&nbsp;in Internet Explorer (either run IE on [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/4963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/users\/94"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/comments?post=4963"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/4963\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media\/10268"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media?parent=4963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/categories?post=4963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/tags?post=4963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}