September 2008

Team Foundation Server Restore Headaches

I was in the process of trying to restore my TFS Server to a different machine until there was time for it to be rebuilt. This turned out to be quite a headache. Once all the querks were identified it wasn’t all that bad but it took much longer than it should have. Here are the key steps:

  1. Install Fresh Copy of Team Foundation Server
  2. Stop all Services (IIS, REporting Services)
  3. Restore all TFS Databases
  4. Restore Reporting Services Databases
  5. Restore SharePoint Content Database
  6. Log into SharePoint Administration and remove content database and re-add WSS_CONTENT database
  7. Ensure Reporting Services is functioning
  8. Run TfsAdminUtil configureconnections and ensure reporting services is pointing to new machine
  9. Modify web.config in the web services/services/ directory so the data tier matches EXACTLY what was in the previous machine
  10. Run TFSAdminUtil renamedt ensuring data tier
  11. Run TFSAdminUtil activateat
After those steps you should be up and running. The major issue I ran into was the renamedt where i was using lower case when it was caps in the previous instance. This is important because it uses this to search & replace in other locations. If it does not match exactly it will fix one config location but not all and the new instance will still be pointing to the old data tier.

General

Comments (0)

Permalink

Using XSLT in .Net

So you’ve finished writing your new XSLT file using your favorite XML/XSLT editing tool. Great. Now for the next problem, you’ve been given the task to transform thousands of XML documents using your new XSLT file. Great… There’s no way we can transform all of these documents by hand. At this point we should be thinking about automating this process in the fastest and most efficient way possible. This scenario may sound familiar to some of us. Luckily, .Net provides us with such options.

For this example we’ll be serializing an XML file and transforming it using .Net’s XSLT processor. The process is very simple, and requires very little code.

  1. Load the XML File into memory using the XmlReader class.
    var reader = XmlReader.Create(xmlFileLocation);
  2. Create a StreamWriter object which will be used to write the transformation to a file.
    var textWriter = new StreamWriter(outputFileLocation);
  3. Create an XslCompiledTransform object which will be used to transform the XML file using the specified XSLT file.
    var xslTransform = new XslCompiledTransform();
  4. Transform the XML and write to a file using the StreamWriter.
    xslTransform.Load(xsltFileLocation);
    xslTransform.Transform(reader, null, textWriter);

Hope this helps.

-Jon

.NET Framework

Comments (0)

Permalink

Process vs Thread

Yesterday, Google launched their first web browser application, named Chrome.

http://www.google.com/chrome

And here’s an interesting cartoon that describes Google’s take on web browser.

http://www.google.com/googlebooks/chrome/

What’s interesting is the idea of Process vs Thread.

Google’s Chrome uses Process for individual window, tab, and even plug-in.

In contrast, Firefox, the popular open source web browser, utilizes multiple threads for managing its windows, tabs and even plug-ins.

I think some of you remember that Internet Explorer has always been using Process for windows management. Any new windows are launched via new processes, and people did not like this idea, I guess. Firefox, instead, created one process application.

Of course, Internet Explorer 7 uses threads, but only on the tabs.

So, google’s take on web browser application is to use all process and no thread. I find this quite interesting, because as we all know, process takes more memory space than thread does. As we open hundreds of windows/tabs, will it run properly without causing OS failure?

Also, managing process means direct OS interaction. Currently, the Chrome only is supported in Windows. I wonder how well this app will be ported into other OSs such as Linux and OS X. I don’t think there will be much “code sharing” between the different versions of this application since each app version needs to be specific for the different OS that it supports. Due to the way Permissions work on different OSs, I wonder how consistent the Chrome will be on different platforms.

Here’s an interesting article that I found.

http://www.cafeaulait.org/course/week11/02.html

-SK

General

Comments (0)

Permalink