戰地連結︰ Home My Flickr NBA.com About

2008年7月30日星期三

How to: Set Team Foundation Server Administrator Permissions

Overview

Below MSDN post shows the steps to grant sufficient privileges to a new Team Foundation Server Administrator.

Reference

How to: Set Team Foundation Server Administrator Permissions

Hands-Free TFS 2008 Install

Overview

Installing VSTS Team Foundation Server (TFS) 2008 is way more than just run "setup.exe" and keep clicking "Next". Actually if you have all the prerequisites ready then the installation is simple, but usually you have to prepare all the prerequisites by yourselves.

I found two post by Grant Holliday and William Bartholomew talking about how to automate Installation process of TFS 2005 & 2008. I have never tried it (cos by the time I see these post I was already finishing the installation...), but I think it is good for understanding the process of TFS installation, and it may come in handy someday!

Notes: The guides is for Windows Server 2003, and when I installed TFS 2008 on Windows Server 2008, WSS 3.0 installation cannot be included as part of TFS installation. I must install and configure WSS 3.0 first before I start TFS installation (You may use existing SharePoint sites on other computer for TFS)

Reference

Hands-Free TFS Install (VSTS 2005)

Hands-Free TFS 2008 Install

Renaming a SharePoint 2007 / WSS 3.0 Server

Overview

Sometimes you have to rename a Server, it can easily be done in "System properties". However, if the Server host a SharePoint Services/Server, then renaming will cause SharePoint sites to stop functioning. Eventually I found a Blog showing the steps to rename a SharePoint 2007 / WSS 3.0 Server, and I have repost the steps below.

Reference

Renaming a SharePoint 2007 / WSS 3.0 Server (I copy the steps from here)

Rename a stand-alone server (Office SharePoint Server)

Steps

Change each alternate access mapping for your MOSS/WSS deployment in Central Administration

  1. Open Central Administration
  2. Click on the "Operation" Tab
  3. Click on the "Alternate access mappings" link under the "Global Configuration" heading
  4. Modify each mapping item to reflect your newly chosen server name, making sure to keep port numbers the same (this also include the mapping for Central Administration, don’t worry it's cool)

Use stsadm.exe to invoke the "renameserver" command option

  1. Open a command prompt window and navigate to the folder where stsadm.exe sits. Normally "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN".
  2. Use the "renameserver" command as follows, replacing and with the new and old names of your server:

    stsadm -o renameserver -newservername <newname> -oldservername <oldname>

Rename your Server via Change Name Operation in Windows Server 2003

  1. Now the last step is to simply right click on My Computer
  2. Open “Properties”
  3. Click on “Computer Name” tab
  4. Click “Change” button
  5. Input your new server name and reboot the server

Use stsadm.exe to invoke the "updatefarmcredentials" command option

  1. Open a command prompt window and navigate to the folder where stsadm.exe sits. Normally “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN”.
  2. Type in the following command and press [enter]:

    stsadm -o updatefarmcredentials -identitytype NetworkService

2008年7月29日星期二

Uninstall WSS 3.0 MICROSOFT##SSEE Database

Overview

I come across a situation that I was installing WSS 3.0 but the "SharePoint Products and Technologies Configuration Wizard" failed at half-way and it keep crashing even after I uninstall and reinstall WSS. The result is the broken "MICROSOFT##SSEE" Database which is the configuration database created by WSS. After I followed instructions of the below link, I successfully uninstalled the database and the WSS 3.0 configuration wizard run again!

Reference

Uninstall WSS 3.0 MICROSOFT##SSEE Database

2008年7月28日星期一

Problems installing SQL Server 2005 with IIS 7

Overview

When I install SQL Server 2005 Enterprise on Windows Server 2008 with IIS 7, I was warned that "Microsoft Internet Information Services (IIS) is either not installed or is disabled". Actually this misleading warning means some features of IIS 7 are not installed, and SQL Server 2005 installation needs those features.

Reference

Problems installing SQL Server 2005 on Vista and IIS7

2008年7月22日星期二

Installing PHP with FastCGI in Windows Server 2008 (IIS 7)

Overview

FastCGI can greatly improve the performance of CGI applications. I will share my experience of installing and configuring PHP 5.2.6 with FastCGI in Windows Server 2008 environment (the main difference is between IIS 7 and IIS 6).

Reference

Install PHP

Install IIS FastCGI

Steps

Install & Configure PHP

  1. Download PHP 5.2.6 form http://www.php.net/downloads.php
  2. Extract the ZIP file to C:\php
  3. Copy "php.ini-recommended" to the Windows directory (C:\Windows) and rename it to "php.ini"
  4. Open the "php.ini" and change the following settings"
    • extension_dir = "C:\php\extensions"
    • uncomment and set: cgi.force_redirect = 0
    • short_open_tag = On

Install & Configure IIS 7

  1. Add "Web Service" role at Windows Server 2008 "Server Manager" to install IIS 7.0
  2. Go to IIS Manager, select "Handler Mappings"
  3. Select "Add Module Mapping"
    • Input *.php in "Request Path"
    • Select "FastCgiModule" in "Module"
    • Input "C:\php\php.exe" in Executable
    • Input Name
  4. Press "OK"

Uploading Multiple Files using Struts FormFile

Overview

It is convenient to group same type of Form Inputs with an ArrayList (or other types of List). For checkbox this is easily done in Struts Framework, but how about "File" or other types of input?

Reference

Uploading Multiple Files using Struts FormFile

Code Snippet

I copy the code from the reference link above and do some change on it in order to get the uploaded files in the order shown in the User's Form.

In JSP File

<form name="fileupload" enctype="multipart/form-data" method="post" action="/photos/fileuploadresult">

    <tr>

        <td>Photo 1</td>

        <td><input type="file" name="uploads[0]" /></td>

    </tr>

    <tr>

        <td>Photo 2</td>

        <td><input type="file" name="uploads[1]" /></td>

    </tr>

    <tr>

        <td><input type='submit' name="submit" value="Submit"></td>

    <tr>

</form>

In struts-config.xml

<action path="/photos/fileuploadresult" type="com.uploads.actions.FileUploadAction" name="PhotoUpload" scope="request" >

    <forward name="success" path="/photos/fileuploadresult.jsp" />

</action>

 

<form-bean name="PhotoUpload" type="com.uploads.forms.FileUploadForm">

</form-bean>

In FileUploadForm.java

  public class FileUploadForm extends ActionForm {

    private List formFiles = new ArrayList();

    public List getUploads() {
      return this.formFiles;
    }

    public void setUploads(int iIndex, FormFile formFile) {
      if ( !formFile.getFileName().equals("") ) {
        if ( this.formFiles.size() <= iIndex ) {
          // Fill the list to the specified size
          for ( int i=this.formFiles.size(); i < iIndex; i++ ){
            this.formFiles.add(null);
          }
          this.formFiles.add(formFile);
        } else {
          this.formFiles.set(iIndex, formFile);
        }
      }
    }

  }

2008年7月15日星期二

Lock-down Internet Explorer with password

Overview

You can prevent others from using IE to surf the Internet by using its built-in "Content Advisor". A Supervisor password can be set to control the usage of IE.

Reference

Yahoo! Answers: Block other users from accessing the Internet Explorer

HOW TO: Use the Internet Explorer 6 Content Advisor to Control Access to Web Sites in Internet Explorer

Steps (For IE 7)

  1. Open up Internet Explorer
  2. Click Tools
  3. Click Internet Options
  4. Click on the tab Content
  5. Underneath 'Content Advisor', Click Enable
  6. Then click on the tab General
  7. Under 'Supervisor Password click Create
  8. Make you password then click Ok.
  9. Then Apply and finally Ok