2011年8月24日 星期三

WCF Service中 使用 App_Data 資料夾

使用 HostingEnvironment.ApplicationPhysicalPath (namespace: System.Web.Hosting)
可以取得WCF Service實體位置
故可使用 Path.Combine 來組合出App_Data的路徑,如下:

string App_Data_Path = Path.Combine(HostingEnvironment.ApplicationPhysicalPath,"App_Data");

by Keng-li.Lin

沒有留言:

張貼留言