如何使用我机器的 IPAddress 在 C:\inetpub\wwwroot\ 上创建一个文件夹?ff 代码似乎对我不起作用。它给出错误:不支持给定路径的格式。
` string appPath = Request.PhysicalApplicationPath;
string IPAddress = HttpContext.Current.Request.UserHostAddress;
Directory.CreateDirectory(appPath + "//GM_KanbanTracking/" + IPAddress); error here The given path's format is not supported.
StreamWriter w;
w = File.CreateText(appPath + "//GM_KanbanTracking/" + IPAddress + "/test.txt");
w.WriteLine(fileContents.ToString());
w.Flush();
w.Close();
`