ASP.NET MVC Pass object from Custom Action Filter to Action

The better approach is described by Phil Haack. Basically this is what you do: public class AddActionParameterAttribute : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext filterContext) { base.OnActionExecuting(filterContext); // Create integer parameter. filterContext.ActionParameters[“number”] = 123; // Create object parameter. filterContext.ActionParameters[“person”] = new Person(“John”, “Smith”); } } The only gotcha is that if you are creating object … Read more

Failed to get MSI property in UPGRADINGPRODUCTCODE, WIX_UPGRADE_DETECTED

Ignoring the debug strings, it’s easier to see that the buffer handling is incorrect. I would suggest also outputting the return values from MsiGetPropertyA() and the value in dwValue to confirm, but here’s what I think is happening (comments refer to dwValue): char szBuff[1024]; DWORD dwValue = 0; MsiGetPropertyA(hInstall, “UPGRADINGPRODUCTCODE”, szBuff, &dwValue); // passes 0, … Read more

WiX silent install unable to launch built in .EXE: WiX v3

Faulty Configuration: This line would never run – regardless of silent or interactive mode: <Custom Action=”SilentExecExample” After=”TheActionYouWantItAfter”/> The After attribute must specify a valid StandardAction or CustomAction name. Silent Mode Failure: The line below will fail in silent mode because you run it after InstallFinalize. In this case it will not run with elevation (unless … Read more

Interrupt installation when custom action returns error

Quick Link: Managed Code Custom Actions (below is for C++ native custom actions). UPDATE: Some helpful links. Hello WiX (minimal WiX Visual Studio Project). WiX quick start suggestions. Debugging Custom Actions (for native code / C++ just attach debugger to msiexec.exe). Microsoft Debugging Environments. Dynamic Link Libraries. Suspected causes: Listing some suggestions at the top … Read more