以下のコードは、Path/Directory
to Local Machine を作成した方法を示しています。今、アプリケーションをライブサーバーに配置したいのですが、ライブサーバー上の特定のパスにファイルを作成するという問題があります。どうすればそれを達成できますか?
`string appPath = Request.PhysicalApplicationPath;
string IPAddress = HttpContext.Current.Request.UserHostAddress;
Directory.CreateDirectory(appPath + "//PrintFiles/" + IPAddress");
StreamWriter w;
w = File.CreateText(appPath + "//PrintLabels/" + IPAddress + "/printLabels.txt");
w.WriteLine(fileContents.ToString());
w.Flush();
w.Close();`