TypeInitializationException means that TagNameHandler threw an exception while initializing the type. By that, it means while assigning static variables and calling static constructors. The only static variable that is likely to throw an exception is the instance
object, which calls the TagNameHandler constructor. You will have to view the InnerException of that exception to get anywhere, as so far there is minimal information. There should be a clickable "View Details" button to follow the stack trace.
Something quick would be if AppSettings doesn't contain one of those strings you're accessing. Perhaps debug print AppSettings first. Otherwise, it'll be in createTagDictionary(). The inner exception will tell you.