I have a couple of .NET classes that I use to call stored procedures in two lines of code using .NET reflection.  One of my methods creates a SqlCommand for a stored procedure by examining attributes and parameters on the method that called it (IE the call to the stored proc basically needs to match the method signature).  This technique was initially posted here back in 2002! It was working beautifully for me in debug mode, but suddenly stopped working in release builds. Why?  Because of a JIT optimization known as inlining.  Basically, the .NET JIT compiler took my simple function’s code and placed it “inline” where the call to that function occurs.  I discovered this after a good bit of pain, and finally, a manual in-code reflection-based stack dump to a log file… my method was no where to be found in …

GetCustomAttribute returns null or nothing in release builds Read more »

I just spent a few hours debugging something, and I thought it might be worth posting in case anyone else out there might ever have this obscure problem. My app brings up an external page in a WebView that contains ads.  My emulator and my phone (not rooted) brought up these pages with little problems, but on my rooted Transformer Tablet, in my assigned WebViewClient, I kept getting an onReceivedError method call, errorCode=-6, description=”The connection to the server was unsuccessful.”  This was happening on embedded doubleclick ad URLs and other external ad URLs.  I thought maybe there was some security setting that prevented cross-domain or cross-site loading of scripts or images, but that seemed to be a pretty extreme default setting for WebView.  (IE many sites load jquery directly from the jquery site, or use content delivery networks for images… both …

Android WebView – “ads failing to load” solution Read more »

While thousands of custom websites with custom checkout procedures process credit cards, relatively few meet PCI compliance standards. Basically, when a credit card number TOUCHES your server, even if you do not store it, your system falls under PCI compliance guidelines which are pretty nasty.  The easiest thing to do is never let a credit card number even pass through your server.  Many folks use Authorize.NET’s SIM method, but it requires the credit card number passing through your server, setting you up for a likely PCI audit failure.  Granted, credit card companies don’t run around auditing small online businesses, but I like doing things right and treating sensitive information with respect. Authorize.NET DPM seems like a great method.  However, I found the documentation at Authorize.NET confusing, and they do not provide an ASP.NET Web Forms example of DPM. So I …

Using Authorize.NET DPM (Direct Post Method) from ASP.NET Web Forms Read more »