We have some PHP and Javascript apps that call into some ASP.NET MVC endpoints. Let\'s say we have this endpoint:
public ActionResult DoSomething(bool flag)
You could use a custom model binder, as found in this SO question ASP.NET MVC controller actions with custom parameter conversion?
Now if you wanted to do this globally so you didn't have to set an attribute on every bool that might get a 0/1 instead of true/false, then you can extend the default model binder to understand 0 or 1 as false or true by overriding the default model binder, as found in this SO question Change the default model binder in asp.net MVC
Some combination of these two should get you what you want.