canton7
✅ How do I get rid of 'System.ArgumentOutOfRangeException'
Let's look at the docs (https://learn.microsoft.com/en-us/dotnet/api/system.string.substring?view=net-8.0#system-string-substring(system-int32-system-int32)):
public string Substring (int startIndex, int length);
length
Int32
The number of characters in the substring.
48 replies
Uncaught exception
The body of RunImpersonated is something like (hugely simplified):
Because your exception is being caught by non-user code, it gets counted as user-unhandled. Yes I know you catch it later, but the first time it's thrown it's caught be non-user code
13 replies
Uncaught exception
https://devblogs.microsoft.com/devops/understanding-exceptions-while-debugging-with-visual-studio/:
User-unhandled Exceptions: When a first chance exception is not caught (handled) in user code and is caught in “External Code” on the call stack, this is classified as a “user-unhandled” exception. This classification is only applicable when debugging Managed or JavaScript applications with Just My Codeenabled.
13 replies
UseStaticFiles for HTML
https://source.dot.net/#Microsoft.Extensions.FileProviders.Physical/PhysicalFileProvider.cs,c7243b62fd6ea79f, look for
PathUtils.PathNavigatesAboveRoot
and IsUnderneathRoot
24 replies