Showing posts from November, 2011

Display ASP Menu Control in Chrome / Safari

I had a problem displaying the standard menu control in Google Chrome and Safari I was using master pages but if you modify the source file behind your master page and include the following C# protected void Page_Load(object sender, EventArgs e) { if (Request.UserAgent.Contains("AppleWebKit")) Request.Browser.Adapters.Clear(); } VB.NET Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init If Request.UserAgent.Contains("AppleWebKit") Then Request.Browser.Adapters.Clear() End If End Sub

Evaluating CDNs

This service CloudHarmony will test CDN networks near you.  It can test for other services also such as Cloud Storage etc.  Very neat.

UDF Class VB.NET Reset Connection String for Entity Framework

This is a useful class I've created mixing and matching code from the web. But basically it allows you to reset the connection string for an entity framework and save the values to the current application configuration file. To use, something as follows        Dim uConnection As New uCustomConnectionString ' Connection String  Name ' Server ' Database / Catalog ' Username ' Password         uConnection.SetDatabaseConnection ("db1001229_CountersEntities", "localhost\sqlexpress", "db1001229_Counters", "sa", "password") ---- Class Imports System.Configuration Imports System.Data.EntityClient Imports System.Data.SqlClient Public Class uCustomConnectionString     Public Function SetDatabaseConnection(ByVal oConnectionString As String, ByVal ServerName As String, ByVal DatabaseName As String, ByVal NewUsername As String, ByVal NewPassword As String) As DialogResult         Dim curConnection =

.htaccess for XCART 4.4

Below is a typical .htaccess file to be used with x-cart 4.4 Change yourdomain to what ever. Redirects from to Also forces home.php to Also implements clean URL. Make sure Clean URL turned on in admin control panel within x-cart # Clean URLs [[[ Options +FollowSymLinks -MultiViews -Indexes <IfModule mod_rewrite.c>         RewriteEngine On         RewriteBase /         DirectoryIndex home.php index.php         RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /home\.php\ HTTP/         RewriteRule ^(.*)home\.php$ / [R=301,L]         RewriteCond %{HTTP_HOST} ^yourdomain\.com [NC]         RewriteRule ^(.*)$$1 [L,R=301]         RewriteCond %{ENV:REDIRECT_STATUS} !^401$         RewriteCond %{REQUEST_URI} !^/(payment|admin|provider|partner)/         RewriteCond %{REQUEST_FILENAME} !\.(gif|jpe?g|png|js|css|swf|php|ico)$         RewriteCond %{REQUEST_FILENAME} !-f         RewriteCond %{REQUEST_F

Is mod_deflate working in Apache

 Just working on a number of projects and I wanted a quick and easy way to check if mod_deflate(compression) originally mod_gzip is enabled for a paritcular web server running apache. This web site has a number of useful tools to assist with this. * is gzipped * Original Size: 285.14 KB * Gzipped Size: 49.74 KB * Data Savings: 82.56%

Microsoft All-In-One Code Framework

The Microsoft All-In-One Code Framework is a free, centralized code sample library provided by the Microsoft Community team.  Their goal is to provide typical code samples for all Microsoft development technologies. You can view and download code samples from this link. You can also request code samples from Microsoft from this site.

Freely-available libraries for the Microsoft .NET

Qink has assembled a comprehensive list of freely-available libraries for the Microsoft .NET platform.

Charting Made Simple with FusionCharts

A very neat library that developers can use free of charge in your web development projects to display nice charts e.g. bar charts, line charts, pie charts etc is Fusion Charts Free Edition I will post some code later for using these But used dynamically with database content they provide an excellent way to help your end users visualise trends in data over time etc

Amazon Outage - What can you do

I think one of the biggest challenges facing any start-up is how to develop a sustainable DR strategy and plan which takes consideration of the current financial standing of the start-up. I also think many start-ups with good intentions discuss, explore and document DR strategies most appropriate to there business, but how many actually test or execute the DR strategy prior to a major outage. And it’s not good enough to just test the infrastructure, application and data You got to literally pull the plug. While many cloud vendors will claim that they can offer full redundancy and reliability its my opinion that all start-ups where it is financially viable should select two cloud providers i.e. primary and stand-by (DR). Interesting debate at CloudAve

NimbusDB Next Generation Database Platform

This looks really cool. NimbusDB. Its a combination of NoSQL and SQL, takes the best from both, combines them but plans to give developers a much more scalable database platform on which to build applications yet maintain the simplicity of using standard SQL Queries. Watch Barry Morris, who is ex founder of IONA by the way. Video streaming by Ustream NimbusDB Presents at Under the Radar

Resize your VMWare Disks on CentOS

Modify you VM settings and increase the hard disk size for example add an additional 10GB. Boot system Run fdisk and recreate partition #2 fdisk /dev/sda2 Issue the following commands D 2 N P 2 <enter> <enter> t 2 8e w Reboot System lvm pvresize /dev/sda2 lvm pvdisplay # Take a note of the free PE (physical extents) lvm vgchange -a y lvm lvdisplay  # Take a note of logical volume lvm lvextend -l +320 /dev/VolGroup00/LogVol00 resize2fs /dev/VolGroup00/LogVol00 You will need to tweak as  you go along.  In some examples above on the web, some people don’t do any reboot after step 4, but I needed to do a reboot.  Also after step 9ome people run an e2fsck, when ever I did this step 10 failed

Sample Conflict Resolution File for Plesk Restore

This is a sample conflict resolution file for Plesk which can be used during a restore Change to your domain and the IP address to your new shared IP address <?xml version="1.0" encoding="UTF-8"?> <conflict-resolution-rules>     <policy/> <rule conflict-guid="3fa1491e30551a7e3d1800bcc04077e1" conflict-id="0">  <node children-processing-type="" name="domain">     <attributes>      <attribute name="id" value="4"/>      <attribute name="guid" value="D68A3BF8-9C79-4072-A65F-8B25A02C7BC9"/>      <attribute name="owner-guid" value="B416FF5A-136E-49F2-87B5-AEE13717F68B"/>      <attribute name="name" value=""/>     </attributes>    </node> </dump-objects> <resolution>             <rename new-name="ip-type:shared:ip-address:2

Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine

I had a basic problem recently porting an ASP.NET application from 32 bit Windows 2003 to a virtual environment running Windows 64 bit. The ASP.NET application was pretty basic and it worked with a MS Access backend. I was using OLEDB Provider to connect from ASP.NET to the backend database But as it turns out there is no version of JET for Windows 64 bit. So you have to disable 64 bit ASP.NET under IIS and enable 32 bit ASP.NET under IIS. Here are the steps I followed. To run the 32-bit version of ASP.NET 2.0, follow these steps.  This was based on ASP.NET 2.0.50727 Start / Run  / cmd cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET   W3SVC/AppPools/Enable32bitAppOnWin64 1 %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i Note One thing I missed, again simple but is to make sure that the 64 bit version of ASP.NET is prohibited and the 32 bit is allowed under the IIS web service extension list.

A Change from Zend, try Grails

I’ve been working with Grails for the past few months and I really like the platform.  Having worked with frameworks such as Zend, Grails comes as a breath of fresh air. Grails is an open-source web application framework that leverages the Groovy language and complements Java Web development. Its based on the MVC framework and it simplifies the work involved in getting your next web application up and running Visit

Getting Started With Grails