2009年7月9日

Read File in WebService

最近在開發 Silverlight Application 時,
為了讓程式保持在最短小的狀態,
需要透過 WebService 下傳 Xap 檔案。
在設計的過程中,
必須解決 WebService 讀取相對目錄下的檔案問題,
以下是相對目錄的取得方式:

string path =
  System.Web.Hosting.HostingEnvironment.MapPath
               ("~/ClientBin/PhotoViewer.xap");           
  FileStream fileStream = 
     File.Open(path, FileMode.Open, 
               FileAccess.Read, FileShare.Read);

沒有留言:

Deploying Vue & .NET with Google OAuth on GCP Cloud Run

Deploying Vue & .NET with Google OAuth on GCP Cloud Run Deploying Vue & .NET with Google OAuth on GCP Cloud Run...