的絕對路徑,我呼籲在C#中的方法如下:獲取相對路徑
return Chart.RenderChartHTML("../../Charts/MSLine.swf");
的事情是,該路徑可以在哪個文件夾我從打電話RenderChartHTML不同,這取決於。
我嘗試以下,這樣找到的絕對路徑,但不工作:
string mslinepath = HttpContext.Current.Server.MapPath("~/Charts/MSLine.swf");
return Chart.RenderChartHTML(mslinepath);
這有幫助嗎? http://stackoverflow.com/questions/837488/how-can-i-get-the-applications-path-in-net-in-a-console-app – Joe