Building the first server for colocation: Part 3

by Ross Buggins 16. April 2012 13:47
Our first server has been in colocation now for a couple of months and all is going well.  Below are a few shots of it in place.

Tags:

Nesting disposable objects in using statements. Multiple calls to dispose.

by Ross Buggins 1. April 2012 12:37
Its easy to want to do this:   using (var stream = new MemoryStream()) using (var writer = new StreamWriter(stream)) { writer.WriteLine("My line to write"); writer.Flush(); } However, code analysis points out that stream can get disposed twice. So, the first way to get round this is just to nest the stream inside the writer and don't hold reference to it. using (var writer = new StreamWriter(new MemoryStream())) { writer.WriteLine("My line to write"); ... [More]

Tags:

LoadFrom or LoadFile - They really aren't the same

by Ross Buggins 1. April 2012 12:32
It's an old post from 2003, but i think it still holds true today. LoadFrom() goes through Fusion and can be redirected to another assembly at a different path but with that same identity if one is already loaded in the LoadFrom context. LoadFile() doesn't bind through Fusion at all - the loader just goes ahead and loads exactly what the caller requested. It doesn't use either the Load or the LoadFrom context. Extract from: http://blogs.msdn.com/b/suzcook/archive/2003/09/19/loadfile-vs-loadfrom.aspx  

Tags:

What’s New DNN 6.1.4 (Dot Net Nuke 06.01.04)

by Ross Buggins 8. March 2012 12:02
Yesterday (7 March 2012) DNN released an update to 6.1.  the highlights are: Major Highlights Fixed issue with loading the splash page skin in the login, privacy and terms of use pages Fixed issue when searching for keywords with special characters Fixed redirection issue when the user does not have permissions to access a resource Fixed issue when clearing the cache using the ClearHostCache() function Fixed issue when displaying the site structure in the link to page feature Fixed issue when inline editing the modules title Fixed issue with incorrect redirect... [More]

Tags:

Modifying the Invenmanager Events Source Code to support quick multi-person bookings

by Ross Buggins 8. March 2012 11:23
We’re currently working on a project www.theatretripskent.co.uk and we needed a booking system to integrate with it as quickly as possible.  We chose to buy the source code for invenmanager events.  They had a lot of the core functionality we required, including multiple payment gateway, and with the source code we knew we could do a few changes to get it in line with the requirements. The only draw back for us with the source was the fact the it is all VB has not been ported to C# to be inline with the core of DNN. The first big change we made was to the registration process.... [More]

Tags:

Photo Image Duplication Finder

by Ross Buggins 9. February 2012 12:31
ImageDuplicationFinder.rar This photo image duplication finder looks through the specified directories and can move duplicated to a new folder.  It bases the comparison on: camera model camera make date taken The program is designed to help you find duplicate photos and leave the most recently modified version in place. Files that have been modified but are the same photo will be identified as duplicates.  The most recently modified image will be left in place and all others moved to the move folder.  It will also pick up photos that have been renamed. The du... [More]

Tags:

Buying a British Red Phone Box

by Ross Buggins 1. February 2012 22:43
A red phone box in the garden would be a nice quirky addition, http://www.uniquelybritish.com/Item/BRITISH_RED_K6_TELEPHONE_BOX.aspx. From their site we have a nice use of www.photolinedrawing.com to convert the images into a pretty good line drawing.  

Tags:

IE7 and inline block

by Ross Buggins 29. January 2012 01:10
Here is a neat fix for making ie7 deal with inline blocks: http://flipc.blogspot.com/2009/02/damn-ie7-and-inline-block.html

Tags:

STK600 and AVRDragon

by Ross Buggins 27. January 2012 12:41
My AVR Dragon arrived today.  It enables me to debug as well as program with the STK600.  It plugs into the STK600 via the 6 pin ISP ribbon and via USB to the PC. You have to also remove the jumper on the reset on the STK600. Now in AVR Studio you can enable debug wire on the fuse and use the debug button.

Tags:

Getting back into electronics with a 555 timer and a 4017 decade counter

by Ross Buggins 27. January 2012 12:02
Its been along time since I really did any electronics work and programming the ATTiny44 microcontroller has got be back into it. I’ve ordered some electronic starter kits, Beginners and Component Kit as the first you can use with some tutorials from the electronics club web site. The first circuit I’ve made is a 555 timer which is is sending its signal to a 4017 decade counter. A 555 timer can have lots of functions but I’m using it as an astable circuit.  This means it makes regular pulses on its own without any interaction from you. The 55 does this by continual charging and d... [More]

Tags:

First use of STK600, ATTiny44 and AVR Studio 5

by Ross Buggins 27. January 2012 11:22
The ATTiny44 is a small 8 bit AVR microcontroller with a 10Mhx processor, 4KB of Flash, 256B of EEPROM and 256B of SRAM.  There is a comprehensive data sheet from Atmel which is pretty much the bible for when trying to program the chip. There are also lots of copies of the STK600’s manual online.   When you first look on the Atmel web site for finding the equipment needed to program an AVR microcontroller, your naturally drawn towards the starter kit, the latest version of which is the STK600, I was.  Once you start looking around on the internet people say it has a few draw... [More]

Tags:

Centos 6 on HyperV R2

by Ross Buggins 21. January 2012 19:19
This is my first foray into Linux.  It makes sense to do it now with a powerful server going into colocation I can make the most of offing Linux hosting to clients. I’m going with Centos 6 as my first option.  This is how I got on. I’m aming to install the LAMP stack so play to try and follow http://library.linode.com/lamp-guides/centos-6 First things first make sure you install a legacy network adapter on the virtual machine as by default linux doesn’t pick up the standard adapter. I downloaded the DVD ISOs from the University of Kent mirror service via the Cen... [More]

Tags:

Building the first server for colocation: Part 2

by Ross Buggins 17. January 2012 11:28
So, all of the parts for the colocation server have arrived.  In the end I have gone for: Supermicro SYS-2026T-6RF+ Xeon 2.4ghz E5645 24GB Ram 9 x 147GB 10K SAS6Gb Drives The super micro board is a beast, supporting 2 processors and its 18 DIMM slots supporting 198GB of RAM.  This server should be good for a while. The 9 2.5” SAS Drives are only 147GB. I wanted 300GB but the hard drive shortages and high costs at the moment made it impossible to get anything but very small or very large SAS drives, and my budget wasn’t going to stretch to 9 900GB SAS drives righ... [More]

Tags:

Installing Dot Net Nuke via Web Site Panel Microsoft Web Apps Error: System.InvalidOperationException: '~/Telerik.Web.UI.WebResource.axd'

by Ross Buggins 3. January 2012 20:05
If you get the error System.InvalidOperationException: '~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadStyleSheetManager when installing DNN via the Web apps in WSP, just add this to the web config for the domain: <handlers> <remove name="WebServiceHandlerFactory-Integrated"/> <add name="LogoffHandler*" path="Logoff.aspx" verb="*" type="DotNetNuke.Services.Authentication.LogOffHandler, DotNetNuke" preCondition="integratedMode"/> <add name="RSSHandler" path="RSS.aspx" verb="*" type="DotNetNuke.Services.Syndication.RssHandler, DotNetNuke" pr... [More]

Tags:

Building the first server for colocation: Part 1

by Ross Buggins 21. December 2011 16:02
I’m currently working on building our first server for colocation. Until now our servers have all been rented servers.  This has been fine until now, but with the new version of TARAS, our rota software, we’re looking to build a more powerful server to host this.  We could rent a server, but I want to be fairly specific over the specifications, and the ability to easily upgrade the server if demand requires it. The big negative with colocation is having to worry about component failure and having to replace the parts yourself. Luckily, a new data centre has opened within... [More]

Tags:

Covert string to enum - parsing string to enum

by Ross Buggins 20. December 2011 15:20
I always forget the syntax for parsing a string and converting it to an enumerable. Here it is: object Enum.Parse(System.Type enumType, string value, bool ignoreCase) The use is: var planetEarth = (PlanetEnum) Enum.Parse(typeof(PlanetEnum), "Earth" true);    

Tags:

Power Efficiency Diagnostics Report - powercfg.exe /energy

by Ross Buggins 14. December 2011 16:13
I've recently found a compact little tool in Windows 7 that generates a report for your power consumption.  It looks at drivers and settings over a 60 second period to see what can be done to improve the power efficiency of your machine. To run it just use: powercfg.exe /energy It generates a HTML file in your standard user space with its findings.  

Tags:

Dot Net Nuke Mega2DNN Menu flickers (& portal.css not loading)

by Ross Buggins 8. December 2011 10:21
I've recently started using the Mega2DNN DNN menu on a site but found that on certain large sub menus it starts to flicker. It's all down to a z index problem on the menu.  To overcome it, just add this to the portal.css throught ADmin -> Site Settings -> Stylesheet editior. ul.megamenu li .sub {z-index:9999;} If there is nothing else in there - note. -The first time you add anything to the portal stylesheet you must click update after you click save style sheet otherwise the portal.css style sheet will not be loaded to each page.  On subsequent changes to the... [More]

Tags:

Fix for DNN 6.1.1 remove sitemap friendly URLS

by Ross Buggins 6. December 2011 11:00
With the DNN 6.1.1 release, sitemaps lost their friendly URLs and were replaced with TAB Ids. Here is the report of the problem http://support.dotnetnuke.com/issue/ViewIssue.aspx?ID=18770&PROJID=2 . DNN have fixed this bug in 6.1.2, but what if you don’t want to wait for the release? I have compiled the latest DNN Sitemap provider and its available attached to this post (DotNetNuke.SitemapProviders.CoreSitemapProvider.rar (3.94 kb)). Just extract the DLL and upload it to you bin/providers folder overwriting the new one. Then got portals\[your portal]\sitemaps and dele... [More]

Tags:

View list of databases on a server based on created date

by Ross Buggins 28. September 2011 09:27
SELECT name, create_date FROM sys.databases order by create_date desc  

Tags:

SQL Server and Integrated Identities for IIS 7.5 worker processes

by Ross Buggins 10. August 2011 11:21
Here's the info you need: http://stackoverflow.com/questions/1933134/add-iis-7-apppool-identities-as-sql-server-logons and http://learn.iis.net/page.aspx/624/application-pool-identities/

Tags:

Problems when trying to format asp.net TimeSpan

by Ross Buggins 8. August 2011 17:17
The custom TimeSpan format specifiers do not include placeholder separator symbols, such as the symbols that separate days from hours, hours from minutes, or seconds from fractional seconds. [More]

Tags:

OWASP. Open Web Application Security Project

by Ross Buggins 8. August 2011 17:16
OWASP https://www.owasp.org/index.php/Category:How_To Web application security is an essential component of any successful project, whether open source PHP applications, web services such as straight through processing, or proprietary business web sites. Hosters (rightly) shun insecure code, and users shun insecure services that lead to fraud. The aim of this Development Guide is to allow businesses, developers, designers and solution architects to produce secure web applications. If done from the earliest stages, secure applications cost about the same to develop as insecure applications, bu... [More]

Tags:

photolinedrawing.com LICA Convert images to line drawings

by Ross Buggins 20. July 2011 11:55
One of our projects, photolinedrawing.com has had a few updates. You can now buy credits via paypal and download all your processed images in a handy zip file.  A little bit about LICA: "Using LICA you can convert any photograph into a line drawing, quickly and easily. Unlike other solutions you do not need to download or install a program onto your computer. You can access your line drawings and work on your line drawings from any internet connection. You can customise and change the processing of your photographs into line drawings to find the best processing for differ... [More]

Tags:

Table Valued Constructor

by Ross Buggins 18. July 2011 15:15
http://technet.microsoft.com/en-us/library/dd776382.aspx

Tags:

Find all missing indexes on Sql Server

by Ross Buggins 18. July 2011 14:47
Heres the query you need (found at http://bradsruminations.blogspot.com/) select index_advantage=user_seeks*avg_total_user_cost*(avg_user_impact*0.01) ,migs.last_user_seek ,TableName=mid.statement ,mid.equality_columns ,mid.inequality_columns ,mid.included_columns ,migs.unique_compiles ,migs.user_seeks ,migs.avg_total_user_cost ,migs.avg_user_impact from sys.dm_db_missing_index_group_stats migs with (nolock) join sys.dm_db_missing_index_groups mig with (nolock) on migs.group_handle=mig.index_group_handle join sy... [More]

Tags:

SQL Server 2008 Execution Plan XML Analyser

by Ross Buggins 16. July 2011 22:07
I've been fed up trying to browse through the Execution plan diagrams in SSMS so I have put together a page so that you can paste in the XML and it will generate tables of statistics for you.   You can see each operation, sorted by CPU, IO, over all cost, own cost and in a bulleted tree. It also gives you the parent operation for each of them. I've put it at http://www.shoretechsystems.co.uk/epa/ Hope it's useful.

Tags:

Thread safe MSMQ Send

by Ross Buggins 13. July 2011 18:18
  http://yoelarnon.wordpress.com/2008/10/04/meet-you-in-pdc-2008-usa-visit-is-send-thread-safe/

Tags:

Modify service startup to automatic via registry

by Ross Buggins 7. July 2011 20:43
http://smallvoid.com/article/winnt-services-regedit.html   Change Value data: to the wanted state: 0 = Boot 1 = System 2 = Automatic 3 = Manual 4 = Disabled

Tags:

Quick MX and DNS Check

by Ross Buggins 29. June 2011 17:35
Quickly check dns records: www.testthe.net    

Tags:

Tally Table, quickly creating

by Ross Buggins 17. June 2011 14:42
http://databasechallenges.com/SQLServer/toolbox/tally-table   /*********************************************************************** Purpose: Create a standared "Numbers" table for use in solving T-SQL Challenges. Programmers Notes: 1. This table contains all INTEGER values from 0 (zero) to 1,000,000 inclusive and has a clustered index on the single INTEGER column called "N". 2. The table is named for the challenges so as not to overwrite existing Tally or Numbers tables by accident. Even then, if the tsqlc_Tally exists, this run will abort... [More]

Tags:

Secure string

by Ross Buggins 8. June 2011 14:50
http://blogs.msdn.com/b/fpintos/archive/2009/06/12/how-to-properly-convert-securestring-to-string.aspx

Tags:

Forwarding Events in C#

by Ross Buggins 26. May 2011 08:12
If you ever want to forward events between a class and an instance of a class wihin that class, then here is the best way to do it.   public class Test { public Test() { var a = new A(); a.MyEvent += new EventHandler<EventArgs>(a_MyEvent); } void a_MyEvent(object sender, EventArgs e) { //event fired! } } /// <summary> /// my class /// </summary> public class A { private B MyB = new B(); public event EventHandler<... [More]

Tags:

Custom Scopes - great way to manage objects

by Ross Buggins 16. May 2011 16:37
[No text]

Tags:

Using Flag Attribute for enums with example

by Ross Buggins 16. May 2011 16:35
Example of using Flag Attribute on enums:   using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication4 { [FlagsAttribute] enum Survival : short { GiveWater = 1, GiveFood = 2, GiveSleep = 4 }; class Program { static void Main(string[] args) { for (int i = 1; i < 8; i++) Console.WriteLine(((Survival)i).ToString()); Console.WriteLine("*"); Console.WriteLine("*"); Test(Survival.GiveWater); ... [More]

Tags:

Closure

by Ross Buggins 22. April 2011 10:33
  http://blogs.msdn.com/b/ericlippert/archive/2009/11/12/closing-over-the-loop-variable-considered-harmful.aspx

Tags:

C# Naming Conventions

by Ross Buggins 13. April 2011 14:17
http://msdn.microsoft.com/en-us/library/ms229043.aspx

Tags:

FAQ: Why does DoNotExposeGenericLists recommend that I expose Collection<T> instead of List<T>? [David Kean]

by Ross Buggins 12. April 2011 12:57
Good post   http://blogs.msdn.com/b/codeanalysis/archive/2006/04/27/585476.aspx

Tags:

c# Disposable pattern - blog link

by Ross Buggins 12. April 2011 12:57
  http://dixond.blogspot.com/2010/08/everything-what-you-might-want-to-know.html

Tags:

The fastest way to dynamically create C# objects

by Ross Buggins 1. February 2011 18:39
In a current project I am dynamically creating an object of a certain type depending on a value read back from the database. For example, in the data reader results i may have 2 results coming back, the first with a object type value of ‘STS.Person’ and the second with a type of ‘STS.Location’. The result with a object type of ‘Sts.Person’ should have a C#  type created Person() and the result with an object type of ‘Sts.Location’ should create C# type Location().  Person() and Location() both implement the interface ISTSObjects() so ... [More]

Tags: ,

.net | c#

Exploring Facebook Advertising

by ross buggins 28. January 2011 19:39
As part of our current marketing and sales drive at Shore Tech we’ve set up a Facebook page.  I thought it would be interesting to experiment with the advertising platform the Facebook offers and to see what increase in page views and enquiries it gives us. I have created our basic Shore Tech Facebook page at http://www.facebook.com/pages/Shore-Tech/126077450796511?ref=ts I’m going to go with 3 adverts.  2 with slightly different wordings which link to out Facebook page and one which links to the home page of http://www.shoretechsystems.co.uk/ I’m setting a daily budget of £10 and... [More]

Tags:

Using a t-sql UDT TimeSpan Object on SQL Server with .NET CLR Support

by Ross Buggins 27. January 2011 18:12
My previous post showed a way to get around the limitations of the DateDiff function by creating a .NET CLR function that could cope with returning values between dates that were far apart.  I’ve now taken this a step further by creating a SQL .NET CLR User Defined Type which represents a TimeSpan object. The object has basic Add and Subtract methods which utilise an underlying C#  TimeSpan object.  The object is byte orders and all methods to create it are deterministic meaning that it can be used in a persisted computed column. First of all start with a SQL CLR projec... [More]

Tags: , ,

.net | sql

Overcoming SQL Server 'The datediff function resulted in an overflow'

by Ross Buggins 27. January 2011 14:31
The built in SQL dateDiff function has issues when trying to calculate the difference between dates that are far apart when you request a high precision. There are solutions available which request a difference with a lower precision and multiply that by a constant, however I was looking for a more absolute answer, so I turned to the .Net runtime. [More]

Tags: , ,

.net | sql

The first hello (and VS 2010 Async CTP Intro)

by Ross Buggins 9. November 2010 15:40
This is post one of my new blog, separate to our core Shore Tech Blog. I've made the move to force me to keep a tech and rambling blog as well as our business blog (which admittedly doesn't get updated too often anyway). I'm going to keep the blog as technical as possible, with a target of a post a week. Hopefully it will follow along side the work that is currently going on here at Shore Tech and will let me document any cool tricks and tips I find out along the way. Visual Studio Async CTP To keep with the tech theme in every post I'm quickly going to mention PDC 2010. I've started wading... [More]

Tags: , ,

.net

Month List

Widget Most comments not found.

Object reference not set to an instance of an object.X