Windows 11: Open bigger files even in read only mode throws "File too big" exception in Windows 11
In C# .net 8 try { using var stream = File.OpenRead("C:\temp\somebiggerfile.bin"); Console.WriteLine($"File length in bytes: {stream.Length}"); } catch (Exception ex) { Console.WriteLine(ex.Message); }
On a "real" Windows PC this works as expected. On a Windows 11 running on MAC (M1) within UTM, it throws:
The file is bigger then the maximum allowed size, and cannot be saved. Could be related to this: https://www.wsxdn.com/Troubleshooting/windows-errors/131687.html However, it throws just for normal file operations, it's not a webclient, just open a bigger file in read only mode throws Exception.
This could lead to some Programs just stop working, only by trying to open bigger files. It throws no matter where the file is located, on the virtual disk, or on a network drive.