WhiteSites Blog

How to stay focused during a coding marathon

Aug 18, 2010 by Paul White

Any Athlete will tell you that success is just as much about staying mentally focused as it is about being physically strong.  Well my fellow desk jockeys the same applies for you.  So in this blog I will share my thoughts on how you can be a more effective programmer. 

Read
1 Comments
4766 Visitors
4766 Views

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.

Read
7274 Visitors
7274 Views

FLV Scrubbing with throttling

Apr 30, 2010 by Paul White

In the old days of the internet if you wanted to provide videos on your website, you would use embed tags, or play an FLV via a flash SWF.  But the problem with this the huge amount of wasted transfer that results.  So I set out to develop a customized handler using asp.net that would allow FLV scrubbing, and also allow throttling to save on bandwidth.

Read
3 Comments
12976 Visitors
12976 Views
Adblockers financial impact on your websites traffic

Adblockers financial impact on your websites traffic

Feb 12, 2010 by Paul White

Adblockers have a place in the world.  That place was back when we all were using dial up internet.  Now that everyone is on high speed broadband connections, adblockers are doing more harm than good.  I will show you some concrete data to prove that adblockers are hurting any website that is dependent on Google Adsense for Revenue.

Read
5332 Visitors
5332 Views

Hacker Attacks and Invalid character in a Base-64 string

Jan 13, 2010 by Paul White

On my websites I have them setup to email me anytime a server error happens.  If you ever get an error like "Invalid character in a Base-64 string",  This is likely a hacker attack.   In my case it was on the members login on my client's website.  I logged in and shut down the site.  10 minutes later I started it back up and the hacker had left.  Interesting is what the HTTP RAW data reveled.

HTTP_X_FORWARDED_FOR:84.0.182.175, 84.0.162.91, 84.0.237.176, 84.0.228.6, 84.0.220.100, 84.0.147.233, 84.0.159.1, 84.0.84.37 HTTP_PROXY_CLIENT_IP:84.0.182.175, 84.0.162.91, 84.0.237.176, 84.0.228.6, 84.0.220.100, 84.0.147.233, 84.0.159.1, 84.0.84.37 HTTP_CLIENT_IP:84.0.182.175, 84.0.162.91, 84.0.237.176, 84.0.228.6, 84.0.220.100, 84.0.147.233, 84.0.159.1, 84.0.84.37

Never seen these values before.  According to the logs the IPs were from hundreds of compromised systems. However they all had these values in common.   I am going to add a rule to detect the Class A IP in the 80.x.x.x block in the HTTP_X_FORWARDED_FOR, and block.  Hopefully this helps some other people out

Read
4069 Visitors
4069 Views
w3wp.exe using too much memory and resources

w3wp.exe using too much memory and resources

Oct 1, 2009 by Paul White

If you are having problems with the w3wp.exe process using too much memory, I have the solution to your problems.  Not only will this reduce the size of your w3wp.exe but it will also speed up your website and reduce the amount of transfer your site uses. 

Read
41 Comments
294738 Visitors
294738 Views

CSS div img overlap problem in IE 7

Sep 23, 2009 by Paul White

Not sure why by it seems that IE 7 if you have a DIV and you put something inside it like another DIV or an Image, then you float that item, the item will overlap the bottom of the container div.  The fix was very easy but for some it may not work depending on your design.  The solution was to assign a width to the container div.  This might explain why most newer sites are using fixed width layouts to fit a 1024 display.  So if you wan to make the switch to table less layouts, you might need to rethink how you build websites.

Read
5864 Visitors
5864 Views

fixing The remote host closed the connection. The error code is 0x80070057

Sep 11, 2009 by Paul White

If you are running Windows Server 2008, and IIS 7.  Then the chances are you might have seen this mystery error. The remote host closed the connection. The error code is 0x80070057.  After reading multiple forums, I have found the solution.

So if your event viewer is full of errors like this

Base:
System.Web.HttpException: The remote host closed the connection. The error code is 0x80070057. at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect) at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush() at System.Web.HttpResponse.Flush(Boolean finalFlush) at System.Web.HttpResponse.Flush() at System.Web.HttpWriter.Write(String s) at System.Web.UI.HtmlTextWriter.Write(String s) at ASP.photo_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Read this article

Read
10 Comments
121697 Visitors
121697 Views

IE6 float margins broken nothing working

Aug 14, 2009 by Paul White

If you have ever ran into the problem of having your floated elements not line up correctly in IE6, and you have already tried all the other suggestions like display:inline;  clear:both;  position:relative;  I have a solution, although you may not like it.

Read
3639 Visitors
3639 Views

IE6 floating problem causing wrapping

Aug 11, 2009 by Paul White

There come a time when every developer plays an game of cat and mouse with CSS.  Its not so much the CSS but figuring out how to make it look the same in IE 6, as IE 7 and Firefox.  Well I came across one of these moments tonight.  Very interesting discovery.

Read
3382 Visitors
3382 Views