Tag .net

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…

Vulnerability identified in Smidge CVE-2025-11842

smidge-define-bundle

Smidge – A lightweight library for runtime CSS and JavaScript file management, minification, combination & compression in Microsoft .NET. In Program.cs of a .NET web application a Smidge Javascript bundle is defined with “CreateJs”. This module is vulnerable to arbitrary…

Call stored procedure via DBContext

Tried to call a SP via Entity framework (DBContext) but got a exception that parameter is not supplied. My call looked like: context.Database.ExecuteSqlCommand(“NameOfSP”, new SqlParameter(“@param1”, 1), new SqlParameter(“@param2”, DateTime.Now), new SqlParameter(“@param3”, “test”)); The right call should look like: context.Database.ExecuteSqlCommand(“NameOfSP @p1,…