Fix for Dot Net Error Validation of viewstate MAC failed

View state issues with the error “Validation of viewstate MAC failed”. I ran across this error while building a report in ASP.net c# web forms. The error first started when a viewer refreshed the screen after a long period of no use. Evidently this is a common issue with dotNet apps located on a server instance that also houses several other applications within the same instance (same issues as those experienced with a Web Farm). One fix I found to get around this issue is to switch from auto-generated keys to defining static complex keys.

The following is generated from a completely random key generator that I have developed. Refresh the screen to generate a new set of keys.

validationKey is SHA1 and 128 bits
decryptionKey is AES and 64 bits

Add this to your web.config

[MachineKeyGen][/MachineKeyGen]

Adapted from this MSDN article on MachineKey Configuration.

http://msdn.microsoft.com/en-us/library/ff649308.aspx

Advertisements

Replacing the Firmware on the Linksys WRT54G V8

I have a Linksys WRT54G router and I want to do more with it than the original firmware allows. The key to this is replacing the firmware with a beefed up version. The first step will be identifying a new firmware and DDWRT it is. After looking through various router replacement firmwares I found that the best choice is going to be DDWRT.

What you should know before beginning 

  • Review the DDWRT Wiki
  • Use IE to flash, firefox has known issues, and use http not https
  • Before & after each flash a hard-reset needs to be performed
    • While router is on, press & hold reset button on back for 30 seconds
    • Keep button held down while unplugging power and wait 30 more seconds while still holding down reset button
    • Keep button held down while plugging power back in for another 30 seconds

From DDWRT: V24 preSP2 Beta Build 13064 (check the DDWRT site for updates)

  1. Hard Reset
  2. Linksys CFE-Updater.bin – CFE-Updater-Gv8-GSv7-v3.bin
  3. Hard Reset
  4. VXWorks-killer : WRT54G v8.0 and v8.2 – vxworkskillerGv8-v3.bin
  5. Hard Reset
  6. VXWorks-revert : WRT54G v8.0 and v8.2 – vxworksrevert-Gv8-v3.bin
  7. Hard Reset
  8. Micro Generic – dd-wrt.v24_micro_generic.bin
  9. Hard Reset
  10. Micro Generic – dd-wrt.v24_micro_olsrd_generic.bin
  11. Hard Reset
  12. TFTP-Client for Windows – tftp.exe

If all goes well you will end up with the following DDWRT interface.

DDWRT Interface
DDWRT Interface

Hardware Hacks for the future of my router
http://www.allaboutjake.com/network/linksys/wrt54g/hack/

Related Projects on Instructables

[phpInstrucatblesKeyword]keyword-wrt54g[/phpInstrucatblesKeyword]

2014 Garden Journal Entry 2

20140114

Just an update on my indoor garden. The roma tomatoes and spinach have sprouted!!!! Take that Pegs!

Roma Tomatoes
Roma Tomatoes
Spinach
Spinach

2014 Garden Journal Entry 1

20140104

3 Tiered Planter
3 Tiered Planter

I started a few plants from seed indoors today. I will be journaling my observations and progress. Some of these will be transferred to our outside garden at a later date.

  • 2x Roma Tomatoes
  • Oregano
  • Cilantro
  • Basil (bought already started from the grocery store and transplanted)
  • Spinach

Related Projects on Instructables

[phpInstrucatblesKeyword]keyword-gardening/keyword-container[/phpInstrucatblesKeyword]

An Initial Look at Grafting

Grafting Image - www.ces.ncsu.edu
Grafting Image – www.ces.ncsu.edu

I’ve said it before and I will say it again… a lot, I’m not an expert. This is my initial look at Grafting without having done it yet.

Just imagine having one tree produce peaches, plums and cherries or 3 different kinds of apples or a pecan being able to bear nuts without requiring 2 separate (male and female) trees or an established tree giving a jump start to production.

Grafting is the process of attaching a cutting of one tree to a rooted tree either as a limb, replaced at or just above root stock. This is done by exposing the cambium layer/vascular tissues of two different trees or exposing the cambium layer on the primary and harvesting a bud of another then joining the two together with a hormone and grafting compound (wax, rosin, natural oils) followed by taping/wrapping to protect the exposed woods.

The primary techniques I have found are Whipping, Budding, Cleft and Stubbing. Other techniques I have read about seem to be variations or combinations of those identified.

While not set in stone this doesn’t work with every species and typically only works if the 2 plants are from the same family.

Advantages of Grafting are use of disease-resistant rootstocks, small footprint diversity, and for having both male and female of one species on one graft for plants that require pollination in order to flower, bear fruit or nuts.

If you have some good knowledge on grafting, I’d love to hear from you or even interview you so please contact me via email mrredbeard AT MickRed dot com or call and leave a message at (747) 333-8145

More to come…..

Terms

Scion – a cutting from a woody plant

Rootstock – roots from an established plant

Grafting compound – sealant/protector

Grafting wax – bee’s wax/paraffin/tallow

Rooting Hormone – Salicylic acid that can be obtained from willow buds (highest and most effective concentration)/bark/leaves and is the active ingredient in Aspirin. Supposedly if you add honey it acts as a antiseptic/antibacterial that aids rooting and grafting.

Related Projects on Instructables

[phpInstrucatblesKeyword]keyword-grafting[/phpInstrucatblesKeyword]

References
http://www.ces.ncsu.edu/depts/hort/hil/grafting.html
http://ag.arizona.edu/pubs/garden/mg/propagation/grafting.html
http://extension.missouri.edu/publications/DisplayPub.aspx?P=G6971
http://www.coopext.colostate.edu/boulder/horticulture/pdf/Introduction%20to%20Fruit%20Tree%20Grafting.pdf
http://pubs.cas.psu.edu/FreePubs/pdfs/UJ255.pdf

Interesting Finds Number 2

Daniel Bingham Image courtesy of http://theroadgoeson.com/
Daniel Bingham Image courtesy of http://theroadgoeson.com/

Tonight while googling some terms I ran across Daniel Bingham’s website http://www.theroadgoeson.com. This guy seems pretty cool and his website covers topics that I am interested in such as permaculture, programming to include game engine development and web design. The website isn’t perfect and has some broken links but interesting.

Funny enough I have the same Refactoring book pictured on the coding link. Its about the use of existing code.

Game Engine is called Middle Earth Mud and is described as “a multi-user dungeon written in C++, designed to be as flexible for in game building as possible”.
http://theroadgoeson.com/code/project/middle-earth-mud
http://www.me-mud.org/
https://github.com/danielbingham/muddyreality
or
http://theroadgoeson.com/code/project/muddy-reality
http://muddyreality.me-mud.org/index.php
https://github.com/danielbingham/muddyreality

Farm to Fridge is an opensource web based farmers market
http://theroadgoeson.com/code/project/farm-to-fridge
http://www.farmtofridge.net/
https://github.com/danielbingham/FarmToFridge

Opensource CAD Software

Archimedes OpenCAD
Archimedes OpenCAD

Archimedes is a free and opensource CAD software. The interface is comfortable, fairly easy to use and is similar to commercial platforms. Exportable formats are svg (vector), pdf, xml and arc which is Archimedes’ native format. The downside is that documentation seems to be lacking and I maybe wrong here but there doesn’t seem to be a way to change the unit of measurement. With that said I still love it and will be using it.

You can learn more and download Archimedes here http://archimedescad.github.io/Archimedes/

Combine 2 or more xml files, sort, dedup and display with php

Want to combine 2 or more xml/rss files with php? This commented code should get you started.

The 2 xml files will need to be structured the same in order for this to work without adding more code. The 2 in this example are from the same source with different filters selected. This allows me to sort, filter and dedup using my own methods. You can then re-create the xml or simply display it on the screen like the example does below.

If you still need help feel free to comment below.

Code and Example below

<?php
//Sort Function by title
function sortFunction( $a, $b )
{
return strtotime($b["title"]) - strtotime($a["title"]);
}

$urllist = array();
//Define new xml files here by adding a new line with different urls
$urllist[] = “http://www.instructables.com/tag/type-question/rss.xml?count=100&sort=RECENT”;
$urllist[] = “http://www.instructables.com/tag/type-question/rss.xml?count=100&sort=UNANSWERED”;

//Loop through urllist array adding each item to one multidimensional array
//Define array before populating
$items = array();
foreach($urllist as $url)
{
$feed = simplexml_load_file($url);

//these item names are the child names in the xml
//channel is the wrapper in the xml
foreach($feed->channel->item as $item)
{
$items[] = array(
‘link’ => (string)$item->link,
‘image’ => (string)$item->imageThumb,
‘title’ => (string)$item->title,
‘pubdate’ => (string)$item->pubDate,
‘author’ => (string)$item->author
);
}
}

//Sort by Title
usort($items, “sortFunction”);

//Remove Duplicates
$items = array_map(“unserialize”, array_unique(array_map(“serialize”, $items)));

//Loop through the list and display them
$ictr = 0;
foreach ($items as $item)
{
echo “<div style=’float:left; width:200px; height:300px; margin-right:15px; text-align:center;’>”;
echo “<a href='” . $item[‘link’] . “‘ target=’_blank’>”;

if(strpos($item[‘image’],”defaultIMG”))
{
echo “<img src=’http://www.instructables.com/static/img/footer/footer-robot.png’ />”;
}
elseif(strpos($item[‘image’],”com”))
{
echo “<img src='” . $item[‘image’] . “‘ />”;
}
else
{
echo “<img src=’http://www.instructables.com” . $item[‘image’] . “‘ />”;
}
echo ‘<br />’ . $item[‘title’] . ‘<br />’;
echo ‘By: ‘ . $item[‘author’] . ‘ On ‘ . $item[‘pubdate’] . ‘</a></div>’;
}
echo “<div style=’clear: both;’>&nbsp;</div>”;
?>


Example of the output:

[phpCombineXMLArticle1][/phpCombineXMLArticle1]

Microwave Deathray

Magnetron
There is something called a Magnetron, not to be confused with Megatron,  inside your microwave. This is the primary component that vibrates the molecules of what you are heating in your microwave to generate heat. Mmmm in the words of Jim Gaffigan Haaaot Pocket!

Ok so it’s not necessarily a death ray but I wouldn’t want to put my junk in front of one. Ever heard of a herf gun? A herf gun is a directed energy weapon. Boeing’s CHAMP recently put on a show taking out targeted computers using one. Supposedly a crude herf gun can be built attaching a waveguide or horn antenna to the output of the magnetron.

Original video was pulled from Youtube updated 7/10/2016

Someone else’s crazy project

Note from wiki “a 1.1 kilowatt input will generally create about 700 watts of microwave power”

What I’d like to do

  • Build a Faraday cage so that I can safely perform testing
  • Get one of these powered up with an inline dimmer switch so that I can control the output
  • Build a horn antenna to attach to the Magnetron so that I can control the direction of output
  • Use some equipment to measure the emitted power with in controlled area
  • Use a frequency counter to get a reading of what range is play
  • Cook food from a distance
  • Light up bulbs in a field
  • Destroy some electronics

Related Projects on Instructables

[phpInstrucatblesKeyword]keyword-plasma/keyword-microwave[/phpInstrucatblesKeyword]


Click here to browse through posts written about my interests in Microwave Projects

Interesting Finds

I found some interesting software on an MIT website today. There were 3 on this page that grabbed my attention.

STARCluster
StarCluster
“StarCluster is an open source cluster-computing toolkit for Amazon’s Elastic Compute Cloud (EC2)”. First off I didn’t realize Amazon’s distributed computing could be used like this. Then again I haven’t done much with parallel computing since early days with Beowulf clustering. If that doesn’t give enough of an indication this will, I used to get frustrated with some of the machines I had because they did not have math co-processors and most linux distributions at the time required them.

STARHPC
StarHPC
“StarHPC provides a virtual machine image configured for parallel programming in both OpenMP and OpenMPI technologies.” I love tinkering with custom linux distributions especially on a virtual machine. My first thought is that this would be fun to run on various embedded devices around the house.

STARHydro
StarHydro

“StarHydro is an application for distributed hydrological analysis. It allows the user to delineate watersheds and explore various watershed statistics.” Ok so this is probably my favorite find today. I love data especially when it involves the earth. I can’t wait to see someone make a complete computer model of the earth loaded up with live data fed from sensors all over the world.