getting the xml for running tfsreg.exe
2007-08-03 17:00
288 查看
The TfsReg.exe utility lets you change the URL's that are registered with TFS (tells TFS how to access version control, work item tracking, reporting services, sharepoint, any third-party tools that have registered, etc.). The biggest problem is usually in getting that "clean" xml that represents the current state of your server, so you can edit it and then feed it back in. (Yes, we're considering an "export" option for a future version to make this easier :)
Route 1: use IE logged into app tier
login to TFS application tier
load IE and hit http://localhost:8080/services/v1.0/registration.asmx?op=GetRegistrationEntries
leave toolId empty and click Invoke
In the new IE window that opens (with a bunch of XML output), click File -> Save As
save to reg.xml (or whatever else you want to call it)
load in notepad (or whatever editor you want)
change root element from ArrayOfRegistrationEntry to RegistrationEntries
Make whatever other changes you want (sharepoint url's, reporting url's, whatever) and save
run tfsreg.exe
If you've changed <remove name="HttpGet" /> to <add name="HttpGet" /> in your AT's [TfsInstallDir]\Web Services\web.config to allow remote get calls (you could still do this with a soap call, i'm just being lazy here :) then a little shorter powershell version that takes care of the string replacement and save to a file for you:
Route 2: PowerShell, from wherever
a few lines of script (replace localhost with server name if not logged into the AT)
$url = 'http://localhost:8080/services/v1.0/registration.asmx/GetRegistrationEntries?toolId='
$webClient = new-object 'system.net.webclient'
$webClient.UseDefaultCredentials = $true
$regString = $webClient.DownloadString($url)
$regstring -replace 'ArrayOfRegistrationEntry[^>]*','RegistrationEntries' | out-file 'reg.xml'
load reg.xml in notepad (or whatever editor you want)
Make whatever changes you want (sharepoint url's, reporting url's, whatever) and save
run tfsreg.exe
Note that Route 1 could really be "from wherever" as well if you happened to also change <remove name="HttpPost" /> to <add name="HttpPost" /> (which you generally would, if you bothered to change HttpGet), but I left that out in the above since I wanted "Route 1" to be something that worked for everyone, regardless. :)
Published Thursday, October 12, 2006 10:57 PM by jmanning
Route 1: use IE logged into app tier
login to TFS application tier
load IE and hit http://localhost:8080/services/v1.0/registration.asmx?op=GetRegistrationEntries
leave toolId empty and click Invoke
In the new IE window that opens (with a bunch of XML output), click File -> Save As
save to reg.xml (or whatever else you want to call it)
load in notepad (or whatever editor you want)
change root element from ArrayOfRegistrationEntry to RegistrationEntries
Make whatever other changes you want (sharepoint url's, reporting url's, whatever) and save
run tfsreg.exe
If you've changed <remove name="HttpGet" /> to <add name="HttpGet" /> in your AT's [TfsInstallDir]\Web Services\web.config to allow remote get calls (you could still do this with a soap call, i'm just being lazy here :) then a little shorter powershell version that takes care of the string replacement and save to a file for you:
Route 2: PowerShell, from wherever
a few lines of script (replace localhost with server name if not logged into the AT)
$url = 'http://localhost:8080/services/v1.0/registration.asmx/GetRegistrationEntries?toolId='
$webClient = new-object 'system.net.webclient'
$webClient.UseDefaultCredentials = $true
$regString = $webClient.DownloadString($url)
$regstring -replace 'ArrayOfRegistrationEntry[^>]*','RegistrationEntries' | out-file 'reg.xml'
load reg.xml in notepad (or whatever editor you want)
Make whatever changes you want (sharepoint url's, reporting url's, whatever) and save
run tfsreg.exe
Note that Route 1 could really be "from wherever" as well if you happened to also change <remove name="HttpPost" /> to <add name="HttpPost" /> (which you generally would, if you bothered to change HttpGet), but I left that out in the above since I wanted "Route 1" to be something that worked for everyone, regardless. :)
Published Thursday, October 12, 2006 10:57 PM by jmanning
相关文章推荐
- MOSS 2007 Publishing web site definition template – onet.xml – syntax for properties and getting the right content types
- enter the full pathname for java.exe
- The run destination My Mac 64-bit is not valid for Running the scheme '*****'.
- Microsoft SQL Server 2008 R2 XML处理 One solution is to increase the number of characters retrieved from the server for XML data.
- Getting started with the MeeGo SDK for Linux
- [Android] Eclipse Warning: No grammar constraints (DTD or XML schema) detected for the document
- xml报错“cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element”
- Caused by: org.xml.sax.SAXParseException: The prefix "aop" for element "aop:config" is not bound
- 编译错误“The run destination My Mac 64-bit is not valid for Running the scheme '***',解决办法
- ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot exe
- org.xml.sax.SAXParseException: The prefix "context" for element "context:component-scan" is not boun
- Warning: No grammar constraints (DTD or XML schema) detected for the document
- The run destination''''is not valid for Running the scheme
- not valid for Running the scheme
- The concurrent snapshot for publication 'xxx' is not available because it has not been fully generated or the Log Reader Agent is not running to activate it
- “The run destination iOS Device is not valid for running the scheme”
- there was an error running the selected code generator unable to retrieve metadata for
- The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified.
- java.exe is valid, but is for a machine type other than the current machine
- ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot exe