David Grey's Blog

March 2008 - Posts

ASP .NET ViewState Validation Errors

Tess's If broken it is, fix it you should blog is always good for a read. Tess is an escalation engineer in the Microsoft Product Support Service dealing with .NET and her blog has lots of good info on thorny problems that crop up now and again.

I came across a post on her blog the other day about the ASP.NET Viewstate error - Validation of viewstate MAC failed error occurring on servers that are not part of a web farm. This problem has plagued me on a couple of ASP .NET projects that I've worked on and in one case we were forced to ship an application to a client with viewstate validation disabled as it was the only way we could overcome the problem.

In this instance Tess doesn't offer many solutions but refers to a post by her colleague Tom which does offer a couple of possible solutions. He has a couple of good ideas which I hadn't come across before so if you have this problem they may be worth a try.

I came across another useful solution a while ago which I have used a couple of times. You can avoid viewstate validation error by maintaining the viewstate on the server and not shipping it to the client with each page response. This can be done by overriding the LoadPageStateFromPersistenceMedium and SavePageStateToPersistenceMedium methods in a page, as shown below. I tend to do this in a base class so that all viewstate is persisted on the server.

        protected override object LoadPageStateFromPersistenceMedium ()
        {
            return Session["_ViewState"];
        }

        protected override void SavePageStateToPersistenceMedium ( object viewState )
        {
            Session["_ViewState"] = viewState;
        }

The above approach works well if your web application is lightly loaded and running on a single server but if you are running on a web farm you will need to use external state persistence (database or filesystem) to store the viewstate. This will add overhead that will probably impact the performance of your application. There is however an added side-effect of this method; without the encrypted viewstate in hidden form controls the HTML page is actually smaller and will take less time to transfer to the client.

del.ico.us del.ico.us | Digg It Digg It | Technorati Technorati | StumbleUpon StumbleUpon | Furl Furl | reddit reddit

Posted: Mar 22 2008, 09:52 PM by David | with 2 comment(s)
Filed under: ,
Compostable PC's

I have been an avid home composter for many years now. All sorts of things gets composted in our household, including paper, cardboard, kitchen waste, garden trimmings and grass clippings. We have four compost bins and although none of them get hot enough to kill off weed seeds they do all turn out lovely crumbly black compost which the plans love.

I'm always looking to reduce the amount we throw away by composting more and more things so I was intrigued to come across an article in IT Week recently which discussed efforts that are being made to produce personal computers with biodegradable casings. The idea is that once the PC reaches the end of its useful life the casings could be thrown on the compost heap. Fantastic! I love the idea of being able to dispose of my old PC case in an environmentally friendly fashion and also being able to use it grow more vegetables. Of course the innards are not compostable as they contain large amounts of electronics with toxic materials, but who knows what the future may bring.

Apparently the sorts of materials mentioned are being trialled and are not production ready yet but I saw another article this week, though can't remember where, which mentioned that Acer have just produced a laptop with a biodegradable plastic casing derived from corn starch. I'm guessing this is a similar material to that which some supermarkets use to produce biodegradable plastic carrier bags. It will be interesting to see how well such materials do actually biodegrade. My experience of putting corn-starch based carrier bags in my compost heaps would suggest that they take an awful long time to biodegrade. The carrier bags are still recognisable over a year later so I can imagine that a much thicker plastic, such as the casing of an electronic appliance, will take many years to breakdown.

Cross-posted from http://www.codefounders.com/community/blogs/greenroads

del.ico.us del.ico.us | Digg It Digg It | Technorati Technorati | StumbleUpon StumbleUpon | Furl Furl | reddit reddit

Being green attracts customers

There was an interesting article in the Business section of today's Sunday Times which discusses the fact that many customers are now starting to look at the environmental and green credentials of their suppliers when making purchasing decisions. The article discusses the experiences of several firms in different business sectors and observes that making even small changes, such as turning off lights, can have positive benefits.

There is also some consideration given to the issues of business energy use and energy prices in the context of green issues. If you want to make some simple changes to your business which will help make it more green and save you money in the process, check out our Powerdown - Energy Saving Software and see how it can benefit your business. You might find that it helps you establish your green credentials and sell more to your customers.

del.ico.us del.ico.us | Digg It Digg It | Technorati Technorati | StumbleUpon StumbleUpon | Furl Furl | reddit reddit

Oil - I'll be glad to be rid of it!

We live in a rural community in Yorkshire which does not have a mains gas supply. The house we live in has an oil-fired boiler, which doesn't sit easily with my plans to live a greener life and reduce my dependence on fossil fuels. When we moved here the only other common choices for heating were liquid petroleum gas or propane so there was little option but to use fossil fuels. When we moved in cost us somewhere in the region of 8 pence per litre now it is costing me nearly 60 pence per litre, so not only is not particularly green it's also not particularly cheap and getting more expensive month on month.

Last summer I installed solar hot water heating on my house in an attempt to reduce the amount of oil that I have to use. I'm really pleased with the solar system as it's working really well but I'm still looking to do more to reduce my dependence on oil. Strangely the recent credit crunch may provide me with an unexpected opportunity to do something about it. We have a mortgage with Northern Rock, who are trying to reduce their mortgage portfolio and encourage their customers to remortgage with other lenders. As our interest rate is rather high I'm tempted to do this and add the cost of new, non-fossil fuel heating on to the new mortgage.

So I'm now looking around for alternative forms of heating. Ground source heat pumps seem to be growing in popularity and a new house that was recently built in the village had one installed. I've done some research and it would seem that they give best performance when used in conjunction with underfloor heating but are a lot less efficient when combined with a traditional wet radiator system like ours.

My other option is to use wood-fired heating. We already have a wood burning stove in the house, which is fantastic but it doesn't have a water jacket nor is not sufficient to run the heating. I could install a log burning boiler and I do already have sufficient storage space for one year's worth of fuel. However it turns out that one of the major suppliers of compressed wood pellets is based about 20 miles down the road from our house so my current thinking is to install a pellet-fired boiler with an automatic feed. I think this might be a better choice than a log fired boiler as I wouldn't need to install accumulators to store the hot water, which is good as I don't really have the space for them. I do have space outside to install a hopper to store wood pellets which would be some 3 metres from the boiler. Given the layout of the house an auger feed probably wouldn't work so I guess I would have to use a vacuum fed system.

Does anyone have an experiences they are willing to share of installing and using vacuum fed wood pellet fired boilers and of storing the wood pellets in an outside hopper? If you do I'd love to hear them and the advice would come in very useful.

Cross-posted from http://www.codefounders.com/community/blogs/greenroads

del.ico.us del.ico.us | Digg It Digg It | Technorati Technorati | StumbleUpon StumbleUpon | Furl Furl | reddit reddit

Interesting developments in server power management

Saving energy in the data centre has been the main focus of I.T. energy efficiency efforts for the last 18 months or so and most of the focus has been on the adoption of more efficient hardware. It is interesting to see that software power management technologies are now being deployed in the data centre alongside the adoption of more energy efficient hardware.

This lines up with our own thinking on software power management as we too have idenitified a need for server power management. Our software power management application, Powerdown, is primarily focussed at desktop users but our next release will support power saving on computers running Windows Server. This isn't because we've refocussed Powerdown as a data centre tool, although it could be used in that context, but simply to support a small section of users who run Windows Server on desktop machines. This practice is pretty common in the developer community and by allowing Powerdown to operate on server-class operating systems we can extend power saving benefits to that section of the user community.

del.ico.us del.ico.us | Digg It Digg It | Technorati Technorati | StumbleUpon StumbleUpon | Furl Furl | reddit reddit

Making computing a little bit greener

As some of you may know, I am the managing director of a software development company called Codefounders and have spent my entire career associated with high-tech industry. I love technology and software development in particular but this is one of the things that does not sit happily with my environmentally-friendly outlook on life; the computing industry is not particularly green by any measure. Not only does it involve large amounts of short-lived, electronic hardware created from highly toxic substances such as arsenic and lead but the IT industry uses a phenomenal amount of electric energy. Most of this energy is generated by burning fossil fuels and consequently the IT industry is a major contributor to the emission of greenhouses gases. Some recent estimates suggest that the IT industry is responsible for 2% of the overall carbon emissions, which puts it on a par with the aviation industry.

Over the last 18 months or so there has been a lot of interest in making datacentres and the hardware used in them more environmentally friendly and less energy-intensive through initiatives such as the Climate Savers Computing initiative and the efforts of hardware and software vendors such as  IBM and Microsoft. It is encouraging to see some of the major players in the industry starting to use more renewable energy for powering their own IT operations; for instance Google are investing in renewable energy research and technologies.

Whilst this focus on making datacentres more green is commendable and a step in the right direction I think all users of IT can do more to reduce their impact on the environment. Admittedly a large proportion of energy consumption and carbon emissions are associated with datacentres but I suspect there are more desktop client computers out there than there are servers in datacentres. At this time there is very little focus on what can be done to reduce the environmental impact of desktop computers, particularly with regard to their power consumption. There are a number of software applications available which can help businesses reduce their energy costs by turning off unused computers. Unfortunately most of these are either extremely expensive and focussed particularly at large-scale enterprises, or are simplistic client-side applications which are difficult to manage in a network environment. Some do little more than tweak the operating system power settings and I believe a much more pro-active approach is required to make users take responsibility for the costs, both environmental and financial, of their computer usage.

In many organisations desktop computers are left running 24 hours a day, 7 days a week but are only actually in use for a fraction of that time. In some cases this is required to support automated backup and maintenance policies  but I suspect that in many cases users cannot be bothered waiting for their computer to boot up each time they want to use it and leave it turned on all the time so that it is always available and ready for use when they require it. It was this realisation, coupled with my own desire to try to make computing more green, that has led Codefounders to develop its Powerdown application. Powerdown is a software application which ensures that computers are turned off when not required but are always available when users want to use them. Unlike other similar products Powerdown is centrally managed but operates entirely on the client computer which makes it suitable for all companies, from one-man businesses with no network all the way through to large multi-national corporations. It also continues to operate even when computers are disconnected from the network (e.g. standalone computers, laptops) which allows greater energy savings to be achieved.

Doubtlessly I'll say more about Powerdown in future blog posts. In the meantime, if you are looking for ways to reduce the energy costs and environmental impact of your desktop computers users please take a look at our website and  and download a free evaluation copy of Powerdown. Take a look at the offerings from our competitors too and make sure that you get 

del.ico.us del.ico.us | Digg It Digg It | Technorati Technorati | StumbleUpon StumbleUpon | Furl Furl | reddit reddit

What's It All About?

For some time now I've been (sporadically) posting to this blog and I've really been using it as an aide memoire to myself more than anything else. Whenever I stumble across any technology problem that I have problems solving I post a solution here so that I can find it again should I experience a similar problem in the future. Hopefully it's also useful to others too, and judging by the site traffic reports this seems to be the case.

It struck me the other day though that I don't always make best use of my blog in any other fashion. For instance, I rarely discuss the things that inspire me, the things that excite me and what activities I get involved in that don't relate to software development.

So I've decided to try to blog a bit more frequently and to post on a wider range of subjects. Some of the things you can expect me to blog about in the future include green issues, renewable energy, gardening and, my big passion of the moment, bread making. A pretty eclectic mix! I'll also continue to post about general computing and software development topics and try to keep you up to date with the activities of Codefounders and its products.

del.ico.us del.ico.us | Digg It Digg It | Technorati Technorati | StumbleUpon StumbleUpon | Furl Furl | reddit reddit

Posted: Mar 10 2008, 09:45 PM by David
Filed under: