我一個月前利用FlashCom 1.5和Flash Remoting製作了一個MP3 Streaming播放系統。原理是用ASP.NET C#寫了一個Web Service,讀取我的電腦中一個放MP3的Folder,以RecordSet形式的XML列出。MP3 Streaming播放系統利用Flash Remoting連接這個Web Service,將結果在Tree組件列出來,如圖:
這樣,我無論在什麼地方,只要連上我的電腦Web Server,就可以聽到MP3,十分方便。一切操作正常,一個月後,奇怪的事發生了:MP3 Streaming播放系統列不出任何MP3,但本機(Localhost)測試則沒有問題。起初,我以為是ASP.NET出問題,最後發現原來是Flash Remoting過了一個月試月期,變回Developer Edition,只可以本機測試(將系統時間改回一個月內,可以變回Full Version)。
這提醒我一件事,很多人製作Flash Remoting應用時,喜歡在每個應用Folder獨立複製一份flashgateway.dll,原來除了這個File外,正確應該包括以下Files:
<appFolder>
└gateway.aspx
└web.config
└<bin>
└flashgateway.dll
└frconfig.txt *
└wsdl.exe **
* 如果是Full Licensed Edition版本,請輸入有效Serial Number;否則30日後變成Developer Edition,只接受本機及另一個 IP Address / Host Name(需在frconfig.txt輸入設定)連接。
** 如果出現"Unable to create webservice proxy. Please ensure the Microsoft.NET Framework SDK is installed."錯誤,就需要它。 |