Archive for September, 2012

Simple video II ‘Environment Management ‘

September 30, 2012

Here it is another video by Curtis Lassam, who did previous video (read Automated Testing & Inversion of Control).

Dev-Test-Stage-… environments, Automatic deploy …
This remembered me “It works on my machine” again, and again, and again …

Better watch out! 😉


Simple video about ‘Automated Testing & Inversion of Control’

September 26, 2012

Here is a little video I found (*) last days making easy to understand unit tests, integration tests, automated testing, inversion of control …

Enjoy it!

(*): sorry, I don’t remember where

Technorati tags: Agile, Testing, IoC

Message “ASP.NET 4.0 has not been registered on the Web server….”

September 21, 2012

It happens sometimes…

Re-install from scratch, o.s. IIS, than Visual Studio … and first project web site you get

“ASP.NET 4.0 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.0 in order for your site to run correctly, Press F1 for more details”

What went wrong ?!? IIS was installed before Visual Studio but …

Briefly: you had to install “IIS Metabease and IIS 6 Management Compatibility ” too,

so you need to update IIS installation,

than repair ASP.NET config.

Read full description here: Resolving ASP.NET 4.0 has not been Registered on the Web Server Error

Technorati tags: ASP.NET

XmlDocument and XPath

September 19, 2012

Briefly, first time with XPath looks great, and it is, but when you start coding it is not so easy.
Good news, you just need a lit bit more 🙂

Example: you have a few webservices given similar xml response:

  <ResponseMessage />
  <ResponseCode />
  <!-- put custom xml here -->
  <ServerID />
  <RequestID />

What if you want to log which server run your request?
Sample code could be like this

XmlDocument xdoc = new XmlDocument();
foreach (XmlElement xItem in xdoc.SelectNodes("//ServerID"))
  // do sth

Actually, SelectNodes methods return no nodes, and XPath it’s almost right.
XPath query string miss namespace specs, so xpath query will look for node with empty namespace.

A quick ‘n dirty sample code could be like this:

XmlDocument xdoc = new XmlDocument();
XmlNamespaceManager nsmanager = new XmlNamespaceManager(xdoc.NameTable);
nsmanager.AddNamespace("x", xdoc.DocumentElement.Attributes["xmlns"].Value);
foreach (XmlElement xItem in xdoc.SelectNodes("//x:ServerID"))
  // do sth here

where XPath query string report namespace

Read more here: Xml-SelectNodes with default-namespace via XmlNamespaceManager not working as expected

Technorati tags: XML,XPath

[IAD2010 video replay] Keynote :)

September 16, 2012

Tutto da rivedere il keynote di Perrotta dell’IAD2010.

source: Keynote 2010: Paolo Perrotta

Technorati tags: IAD 2010,Agile Day