LoginSignup
1
1

More than 5 years have passed since last update.

C# > ファイル サイズが、許可された制限を超過しているため、保存できません。

Posted at

System.IO.IOException: ファイル サイズが、許可された制限を超過しているため、保存できません。

処理は以下のような感じ
Sharepoint上のファイル(WebDAV)にアクセスした際に、System.IO.IOExceptionが表示された。

// ファイルを読み取りモードで開く
using (var fs = new System.IO.FileStream(fileFullPath, System.IO.FileMode.Open, System.IO.FileAccess.Read))
{
    // データ格納用の配列を確保する
    result = new byte[fs.Length];

    // バイナリデータを非同期的に読み込む
    await fs.ReadAsync(result, 0, (int)fs.Length);
}

↓こちらに記載あり
Web フォルダーから 50000000 バイトより大きいファイルをダウンロードするときのフォルダーのコピー エラー メッセージ

方法1 レジストリを変更する。

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters

FileSizeLimitInBytesの値を変更する。

image

方法2 Fix itを使う

こっちが簡単
値を入れて次へを押すだけ。

このページの
https://support.microsoft.com/ja-jp/help/900900/folder-copy-error-message-when-downloading-a-file-that-is-larger-than

image

image

その後、PCを再起動

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1