WhiteSites Blog

Generic Error Occurred in GDI with .Net and JPGs

Sep 29, 2015 by Paul White

Everyone who works on ASP.NET websites will eventually come accross this error.  A generic error occurred in GDI+.  This usually happens when trying to save a image file to disk.  Something normal like handling photo uploads then saving them.  In my case I was trying to lower the quality on 20,000 JPG images to about 75%.  The problem I ran into was it wouldn't let me overwrite my image to the original location.  There is a very easy solution to this.  

2109 Visitors
What IPs does Twilio use for Status Updates

What IPs does Twilio use for Status Updates

Oct 21, 2014 by Paul White

Twilio is a great service for developers who want to integrate SMS, MMS, and voice features to their websites and applications.  One of the great things that twilio does is provide status updates on the messages you send. Letting you know if they are Queued, Sending, Sent, or Delivered.  However these status updates come from a Proxy that is Cloud Hosted, and does not originate from any specific IP or block of IPs.  When I submitted a ticket to Twilio asking for the IP blocks they use, they said there are no set of IPs used, and that they are constantly changing.  However After a little digging through my Access Logs I have been able to compile a list of IPs that Twilio has used to access my server.  Hopefully these will help others who need at least something they can whitelist on their firewall for twilio.

1297 Visitors

ABCPDF error Failed to configure IE 9 or above for the MSHtml engine

Jul 6, 2014 by Paul White

I recently built a new server, and have been slowly migrating all my sites from my old box to the new one.  Some of the sites were built using third party components to do things like generate PDF documents.  ABCPDF by websupergoo, was one of the components I was using.  Unfortunately Version 6 of the component, does not play nice with Windows Server 2012 R2.  So I was forced to upgrade to the latest Version 9.1.  After installing the component I still was getting an error message.  Here is the fix.

7208 Visitors
How to test your fax machine when nobody has a fax machine

How to test your fax machine when nobody has a fax machine

May 29, 2014 by Paul White

Recently I had to write a script that would connect to our VOIP provider and send a fax via their web form. The idea was to elminate the additional steps of logging into their system, navigating to the "Send a Fax" section then filling out the form and clicking send.  However once I had a script written I needed to test it.  Unfortunately nobody these days has a fax machine.  Thankfully I found a website that helped me out.

2202 Visitors
Send a Text Message with Twilio using ASP.NET

Send a Text Message with Twilio using ASP.NET

Dec 4, 2013 by Paul White

I recently did a little integration with Twillio for one of my client's websites.  Along the way I had some learning experiences that I thought would be helpful to others.  I found Twilio's Sample code to be a little confusing, and the third party libraries and classes did not work for me.  So I wrote a simple function that sends a text message using twilio.  Hopefully this will help others.
2498 Visitors

How to Fix MySQL Error 10055

Sep 5, 2013 by Paul White

This error recently caused me some stress.  However I found a solution.  If you are running MySQL Server on a Windows Box, I am pretty sure i have the solution for you.  So if your web server is kicking out errors like this

ERROR HY000 MySQLODBC 5.1 DriverCan't connect to MySQL server on 'localhost' (10055) ERROR HY000 MySQLODBC 5.1 DriverCan't connect to MySQL server on 'localhost' (10055)

Read this for the solution
13296 Visitors
How to setup 301 Redirects in IIS 7 for good SEO

How to setup 301 Redirects in IIS 7 for good SEO

Nov 14, 2011 by Paul White

Everybody knows that in order to properly preserve Google Page Rank when you are moving a page on a site, you need to perform a 301 Redirect to the new page, as this tells search engines this is a permanent move, and to record it into their index.  However few people realize the additional problem of duplicate content across multiple domains.  So if you have both your domain and your www subdomain pointing at the same site, its likely that google is penalizing you for this. So in this article I show you how to properly setup a website with multiple domains using IIS 7.5 and 301 redirects for good SEO.

16933 Visitors

ABCPDF component HTML render is blank solution

Nov 7, 2011 by Paul White

Recently I had to migrate one of my clients from their VPS to my colocated box.  The Old box was windows Server 2003, and my server was Windows Server 2008 R2.  However after migrating the first of several sites, I noticed the ABCPDF component was not working properly.  Any request to generate a PDF would error with "HTML render is blank".  If you are in the same situation, then I have a fix.

8610 Visitors
Debugging Faulting Application w3wp.exe Crashes

Debugging Faulting Application w3wp.exe Crashes

May 31, 2011 by Paul White

If your websites are going down, due to your application pool failing, or being automatically shut down after a few application errors, then you have a major problem on your hands.  In my case the symptom was A process serving the application pool suffered a fatal communication error with the Windows Process Activation Service, in my system logs.  If you have each website running in its own application pool then you know which website is going down, but the errors being displayed give you no hints as to the cause.  I recently had a website that was randomly going down.  Sometimes it would go down every few days, and other times it would only crash once a month.  So I finally did some digging for the cause, and found it.  If you don't know where to start in debugging your crashed application pools, this might help.

98049 Visitors

asp.net Stopwatch is better than DateTime

May 2, 2010 by Paul White

In the continuing pursuit of getting my FLV scrubbing application to work correctly, I came across the need to time part of my code.  If you are used to using the DateTime object you might want to try something else.  Turns out DateTime is meant for Date and Times, and is pretty useless to use as a stopwatch when timing the performance of lines of code within your application.

3057 Visitors