Using Transloadit for file uploading & processing on your website

Over the years I have used a variety of custom solutions to resize images, encode video, etc.  Transloadit provides a really nice cloud based solution that you can use with any technology stack.  From rails, to php, to JavaScript, you can interface with their API to upload images and videos.  They offer some easy to use plugins to help get you started

Create a self signed SSL Certificate

 The steps below ouline how to create a self signed cert for use on your local development machine.  This will allow you to run local sites under HTTPS for testing purposes.

1.       Bring up a Visual Studio Command Prompt:  “All Programs>Microsoft Visual Studio 2008>Visual Studio Tools>Visual Studio 2008 Command Prompt” (substitute "Visual Studio 2010" where appropriate if using Visual Studio 2010).

2.       Execute the “makecert” command for your machine.  For this example the fully qualified host name, “
”, is used as the certificate name:
makecert -r -pe -n "" -b 01/01/2008 -e 01/01/2050 -eku -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12

3.       Use the IIS Web Server Certificate Wizard by right clicking on the web site where you want to install the certificate.

4.       Steps to add the Certificate to the the website:

1.       Right click the the website.

2.       Select “Properties”.

3.       Select the “Directory Security” tab.

4.       Select “Server Certificate”  from the “Secure communications” section of the tab.

5.       Click “Next” on the intro to the Web Server Certificate Wizard.

6.       Check “Assign an existing certificate” and click “Next”.

7.       Select the certificate name you just created with “makecert” above and click “next”.

8.       Specify the SSL port.

9.       Review your selections and click “next”.

10.   Click “Finish” to end the wizard.

Client Certificate Installation

In order to use SSL without the warning/error messages that IE will display by default when the server’s SSL certificate has not been issued by a recognized Certificate Authority (such as Verisign, etc.); you will need to add the certificate created by makecert into the “Trusted Root Certification Authorities” store of your Local Computer.

The steps to do this are as follows:

1.      Open up mmc (type “mmc” at the run or command prompt).

2.       Select “File>Add Remove Snap-In…”

3.       Select “Certificates” from the “Available snap-ins” and click “Add”.

4.       Select the “Computer Account” radio button.

5.       Select “Local Computer”, then “Finish”, then “OK”.

6.       Open up the “Certificates>Trusted Root Certification Authorities>Certificates” branch.

7.       Right click on “Certificates” and select “All Tasks>Import…”

8.       Click “Next”

9.       Browse to the certificate file created by “makecert” and “open”.

10.   Click “Next”

11.   Click “Finish”


No Software

I continue to see a trend with most businesses to move away from the self hosted, home grown, monolithic applications and move more to service based software.  While there are some big and well know players, such as, there are many smaller up and comers offering a wide array of software services that do not require any on site software or custom development.

One compnay in particular, Feed.Us offers a wonderful online content management system (CMS) that in addition to traditional content management, offers many value added services.  The real joy of this system is you can get up and running in minutes.  You can transform your static web site into a dynamic web application with little to no custom development.

I really recommend you check out all of the features they offer...



Integrate Disqus into your site using JavaScript

Recently I added Disqus, a hosted comment system, to a site and wanted to point out a couple of things that were not too clear from the documentation on the Disqus site.  It may have been updated, but as of this post, I was not able to find too much info on the JavaScript implementaion of Disqus. 

Basically the JavaScript implementation will work with any web site technology, for example php, ASP.NET, etc.  In order to get it to work, you first need to sign up for an account.  Once you do this, they will provide you with the "code" that you need to add to your site.  Once you add this code, all of the necessary HTML and comment data will appear on your page. 

When you create an account, you provide your site URL. It is important to understand that if you are developing or testing your site on a server other than the one registered with your domain name, the Disqus comment section will not appear.  So if you are setting things up on your local machine and testing, you will not see the full comment section.  Once you push your code to production, you will then see the full Disqus comment section

That is is very easy to set up and use...

Unit Testing and Integration Testing with your database

I like to do a combination of unit and integration testing with my projects.  When testing code that update the database you need to account for the state of your databse.  If you want repeatable tests, you either need to use stubs or mocks or find a way to return your databse to the state it was in prior to your tests running.

 One approach that I have been using with success is leveraging the System.Transaction name space within my tests that update the database.  Below is some sample code using the NUnit testing framework.  By wrapping the code that updates the database within a transaction (using (...)) the save operation is rolled back:

 /// <summary>
/// Transaction is not "completed" so gets rolled back preventing
/// test data from being persisted to db.
/// </summary>
public void Should_Insert_A_New_Info_Object_Into_DB()
using (TransactionScope transScope = new TransactionScope())
string testDateTime = DateTime.Now.ToString();
Info info = AddTestRecord(testDateTime);
Assert.IsTrue(info.Subject == "Subject: " + testDateTime);
Assert.IsTrue(info.Subject == "Subject: " + testDateTime);



Hope people find this technique useful.

Unable to build CSLA.NET

The below error occurred when trying to build the 2.1.4 solution with visual studio 2005 on a machine that also had orcas installed:

"The application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem"

I had previously downloaded the Orcas beta and installed on the same machine.  I ended up having to uninstall Orcas, then uninstall visual studio 2005, and re-install VS 2005.  After the re-install I was then able to build the csla solution.