Johnny Code
Fear no code

John Bubriski

John Bubriski

Get BizForm Record ID

By John Bubriski on February 22, 2012

Here is a post I wanted to write a few months ago while I was actively developing Kentico based websites, but I never got the chance to finish it. The code should be solid, and I’ll explain it as best I can. If you’re working with BizForm’s programmatically you’re going to need to get the ID [...]

Posted in Kentico, Programming | Tagged .NET Framework, ASP.NET, C#, Code, Kentico API Programming, Kentico BizForms, Kentico CMS | Leave a response

How to Recursively Get Files in C# the Easy Way

By John Bubriski on February 21, 2012

Need to get all the files contained in a directory, recursively searching through sub directories? No problem! Here is how to do it without writing your own recursive function: var fileNames = Directory.GetFiles(directoryName, "*.*", SearchOption.AllDirectories); That’s it! No explicit recusrion required! If you want to do searching where you can stop when a given file [...]

Posted in Programming | Tagged .NET Framework, C#, Code, Files and I/O | Leave a response

Filtering Out Linked Documents

By John Bubriski on February 21, 2012

Note: I wanted to add some screenshots to this post, but didn’t have the time. I don’t think it’s super important, but it would definitely help outline the potential issue with Linked Documents. Linked Documents are a great feature of Kentico.  They allow you to create a page that is essentially a shortcut to another [...]

Posted in Kentico | Tagged Kentico CMS, Linked Documents, Menu Web Parts, Repeater | Leave a response

Introducing Encryptamajig, Symmetric Encryption in C# using AES

By John Bubriski on February 15, 2012

This isn’t my normal type of “full” post. Rather, I wanted to plug my own project which attempts to “standardize” the way people do Symmetric Encryption in .NET using the AES algorithm (the successor to Rijndael). It’s called Encryptamajig. To quote the project readme: “When you look at encryption examples online many are verbose, misleading, [...]

Posted in Programming | Tagged .NET Framework, AES, C#, Cryptography, Decryption, Encryption, Rijndael, Symmetric Encryption | Leave a response

Ignoring Elmah Exception Spam

By John Bubriski on February 13, 2012

Did you setup Elmah on your website or web application? Yes? Great. Are you getting 100′s or 1000′s of exception emails every day for bots probing your site for various applications and application frameworks? Yes? Not great. Did you filter all those emails into a folder in your inbox? Yes? Then you’re doing it wrong. [...]

Posted in Programming | Tagged 403 Forbidden, Elmah, IIS, IIS6, IIS7, Request Filtering, URL Rewriting | 2 Responses

SQL Server Cell-Level Symmetric Encryption: The right way

By John Bubriski on February 9, 2012

So I needed to encrypt some sensitive data being stored in SQL Server. I looked into encrypting the data at the application level via C#, but that would mean I would need to ship encrypted data and keys around, which defeats the purpose (we use a thick client). So I turned to SQL Server to handle the encryption for me, and I was pleasantly surprised…

Posted in Programming | Tagged AdventureWorks, AES, Cell-Level Encryption, Certificates, Credit Cards, Cryptography, Decryption, Encryption, SQL, SQL Server, Symmetric Encryption, TDE, Transparent Data Encryption | Leave a response

IIS6 Website Settings

In IIS6 HTTP 301 Redirect from non-www to www

By John Bubriski on January 4, 2012

This article applies to IIS6, but the concept applies to almost any public website.  You should probably setup a 301 redirect from http://example.com to http://www.example.com (or the other way around). If you don’t, bad things can happen.  Anyway, here is how you can do it in IIS6: Instructions Create a new website with the same [...]

Posted in Programming | Tagged HTTP 301 Redirect, IIS, IIS6 | Leave a response

New Developer Resources Page on Johnny Code!

By John Bubriski on November 17, 2011

I’ve added a new page called Developer Resources.  It’s going to be a repository of all of the blogs I read and podcasts I listen to.  It’s a work in progress, but most of the podcasts I listen to regularly are up there now.  Feel free to post suggestions!  Most everything there will be programming/IT related.

Posted in Programming | Tagged Blogs, Podcasts, Resources | Leave a response

ASP.NET MVC Extension Method for the ID in the Route

By John Bubriski on November 9, 2011

If you’ve worked on an ASP.NET MVC site, you may have had to reference the ID in the current route.  In a Razor view you can reference it via the following variable: @Url.ViewContext.RouteData.Values["id"] You may use this a lot if you have a lot of inter-action navigation. Why not throw it into an extension method!? [...]

Posted in Programming | Tagged .NET Framework, ASP.NET, ASP.NET MVC, C#, Code, Extension Method | Leave a response

Custom Validation with BizForms

By John Bubriski on October 17, 2011

Ever need to inject some custom validation into a BizForm?  Check it: Below I’ve provided a method you can drop into your BizForm code behind, or the code behind of a BizForm clone.  Then, call this method from an event handle for the OnBeforeValidate event.  If Field A has a value this validation method forces [...]

Posted in Kentico, Programming | Tagged .NET Framework, ASP.NET, C#, Code, Kentico API Programming, Kentico BizForms, Kentico CMS | Leave a response

Next »

About Me

I'm a Software Engineer at Worcester Envelope in Auburn, MA. Check out the About page to learn more about me.
Follow @JohnBubriski

Pages

  • About Me
  • Contact Me
  • Developer Resources
  • Kentico Resources
    • Kentico Tips and Tricks
    • Settings Module for Kentico CMS

What I’m Reading

  • The Quick Python Book, Second Edition
  • ASP.NET MVC 2 in Action
  • The Art of Unit Testing: With Examples in .Net
  • Code Complete: A Practical Handbook of Software Construction

My Recent Tweets

  • "Pumped Up Kicks" by #FosterThePeople actually has some twisted lyrics... 11 hours ago
  • @codeimpossible Last time I checked most weddings (and marriages) are not democratic in nature... 13 hours ago
  • New blog post: Get BizForm Record ID http://t.co/0wdZ8vAM 15 hours ago
  • @codeimpossible trying out preview/beta bits for vnext of ASPNET. Not as bad as I made it out to be, just frustrated by some changes. 1 day ago
  • @aschepis Thanks! 1 day ago

Tags

.NET Framework AES ASP.NET AspDotNetStoreFront blogging C# Code Code Camp Cryptography Decryption Elmah Encryption entity-framework Exceptions Extension Method HTML IIS IIS6 javascript jQuery Kentico API Programming Kentico BizForms Kentico CMS Learning Python 3 Microsoft PHP plugins Productivity Quick Tip random Return Values Shortcuts SQL SQLite Development Strings Symmetric Encryption Syntax Highlighting Time Saver Travian Add On Project URL Routing Using PyGame Visual Studio web-service Windows wordpress

Archives

  • 2012 (7)
  • 2011 (11)
  • 2010 (19)
  • 2009 (12)

Programming Blogs

  • Code: Impossible
  • Coding Horror
  • Self Elected
  • Stack Overflow

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Copyright © 2012 Johnny Code.

Powered by WordPress and Hybrid.

Maintained by John Bubriski