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.
ファイルが存在するディレクトリと同じディレクトリに C#.net を使用してテキスト ファイルを作成したいと考えています。解決策は何ですか?作成しようとすると、「パス 'C:\Windows\SysWOW64\inetsrv\test.txt' へのアクセスが拒否されました」というエラーが表示されました。助けてください。
ありがとう
たとえば new StreamWriter("test.txt") を作成すると、プロセスの現在の作業ディレクトリ (ASP. NET/IIS)。
Server.MapPath('~\test.text') を使用