Aug 11, 2010

The cryptic AotNodeNotFoundException unearthed

Today I encountered a strange error, the AotNodeNotFoundException. Well, it doesn't sound strange, but the Aot Node did in fact exist, and everything looked to be in perfect order.

Checking more closely I noticed that the AotNodeNotFoundException referenced a slightly shorter AOT node name than Visual Studio and C# did. It turned out there was an AOT node max length limit, and names longer than that were truncated. That left a reference to a truncated user control.

When I shortened the name of the user control, and updated the AOT references accordingly, everything worked just fine.

So keep those AOT node names trimmed!

1 comment:

  1. There is a 40 character AOT node limit, meaning each and every node can have a maximum of 40 characters in its name.

    When you "Add to AOT" from Visual Studio, it uses the name of your user control to create the node name. If the user control's name is too long, the AOT node gets a shorter name (and is broken).