Category Development

C# Scripting – Dynamic code execution

net logo

When using C# scripting and code reflection in .NET Framework, libraries needs to be loaded with “ScriptOptions” from Microsoft.CodeAnalysis.Scripting. This has to be done before code executes with function ScriptOptions.Default.AddReferences(). Note that this is different from dynamic code execution via…

Big logfiles in VSLogs

VSLogs

If you have problems with the disk space suddenly being depleted. Could this be due to large auto-generated log files in VSLogs (../AppData/Local/Temp/VSLogs). This problem seems to have been around for a while and there is also an ongoing case…

UseStatusCodePagesWithReExecute .net 6

net logo

I got some problem when trying to use custom error pages in a .net 6 mvc web app. Using UseStatusCodePagesWithReExecute to redirect to an error controller on exceptions like 404 or 500 response status. But the error controller never got…

Changing password on a user using MMC

warning from mmc

Warning message below is from changing a password on a user in Microsoft Management Console (MMC) Windows 10. The warning message was quite funny, it’s in Swedish but the warning is: ..”Only use this command if a user has forgotten…

.NET MVC – Illegal characters in path

ScenarioRender a ASP.NET MVC Razor view with a model from the controller. Error / ExceptionSystem.ArgumentException: Illegal characters in path. CauseThe model from the controller was returning JSON and the view had declared “@model string” to handle the JSON. SolutionUpdates in…