Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ファイルを 1 つのフォルダーにアップロードする Web アプリがあります。今、サービスを使用してそのフォルダーからファイルを削除したいと考えていますWCF。でasp.net使用しますstring filePath = Server.MapPath(FPath);が、これは では機能しませんWCF。
WCF
asp.net
string filePath = Server.MapPath(FPath);
何か助けはありますか?
次のように変更するだけでよいと思います。
string filePath = HttpContext.Current.Server.MapPath(FPath)