在 Windows Media Service 設定的部分非常的簡單,只需要以下步驟 :
- 新增/移除程式
 - 管理 Windows 元件
 - 勾選 Windows Media Service 並安裝
 - 在程式集裡面啟動 Windows Media Service ,再設定幾下就好了。
 
並且新增個使用者,開啟寫入權限等等。原本以為這樣就結束了,結果使用 FTP Client 軟體連線時,會卡在 Entering Passive Mode,然後出現 list error 等錯誤訊息。Google 了一下,原來是因為啟動了 Windows Firewall 導致 Passive Ports 無法存取而發生的錯誤。下面的網址有提供解決的方法 :
大致設定如下:
On Windows 2003 Server with IIS6
- To Enable Direct Metabase Edit
 - Open the IIS Microsoft Management Console (MMC).
 - Right-click on the Local Computer node.
 - Select Properties.
 - Make sure the Enable Direct Metabase Edit checkbox is checked.
 - Configure PassivePortRange via ADSUTIL script
 - Click Start, click Run, type cmd, and then click OK.
 - Type cd Inetpub\AdminScripts and then press ENTER.
 - Type the following command where the range is specified in "..". cscript.exe adsutil.vbs set /MSFTPSVC/PassivePortRange "5001-5201"
 - Restart the FTP Publishing Service.
 - Add each port to the Windows Firewall   
- Click Start, click Control Panel, open Windows Firewall, and select the Exceptions tab.
 - Click the Add Port button.
 - Enter a Name for the Exception and the first number in the port range.
 - Click TCP if not already selected and click OK.
 - Repeat for each port in the range - for large ranges see the end of the document.
 - Enable the Windows Firewall on the General Tab.
 
 
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
PassivePortRange : (STRING) "5001-5201"
因為要開啟的 Ports 非常的多,所以它寫了一個小小的 Script 來開啟所有 Port :
To add a range of ports to Windows Firewall from the Command Line
- Click Start, click Run, type cmd, and then click OK.
 - Type in the following where the range is specified   in ( ) and the name of the firewall entry is in " ".
FOR /L %I IN (5001,1,5201) DO netsh firewall add portopening TCP %I "Passive FTP"%I - Each port in the range will be added with an "OK" confirmation.
 
你就看到一堆 Port 開啟的訊息出現了。最後再用 FTP Client 連線,順利完成 !
如果是使用 Windows Server 2000 的話 :
On Windows 2000 Server with IIS5 Configure PassivePortRange via Registry Editor
- Start Registry Editor (Regedt32.exe).
 - Locate the following registry key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Msftpsvc\Parameters\
 - Add a value named "PassivePortRange" (without the quotation marks) of type REG_SZ.
 - Close Registry Editor.
 - Restart the FTP Publishing Service.
Note: The range that FTP will validate is from 5001 to 65535. 
沒有留言:
張貼留言