を使用してウェブサイトを開発してVisual Studio 2010
います。ファイルをパスに保存しようとしています。ローカルホストで正常に動作します。
しかし、IIS では同じコードが機能しません。次のエラーが表示されます
例外の詳細: System.IO.DirectoryNotFoundException: パス 'C:\Inetpub\wwwroot\Vendor\cn.jpg' の一部が見つかりませんでした。
パス「C:\Users\shashank\Desktop\ab.csv」の一部が見つかりませんでした。
コードは次のとおりです。
protected void btnImportFile_Click(object sender, EventArgs e)
{
sArReportText = File.ReadAllText(txtFilePath.Text.Trim());
// Set the report Properties to insert Report information
SetProperties();
}