RHa has already answered the main points here, but there are one or two details I would add. First, auf is a Wechselpräposition, meaning it can take either a dative or accusative argument. Which case to use depends on meaning; if there is motion to the location then you use the accusative, if the action is taking place within the location then you use the dative. In the second example, you're looking around in the fair, so the action is taking place within the location and you use the dative. If the action involved going to the fair, as in Ich gehe auf die Messe um mich umzusehen, then you'd use the accusative.
The first example uses a prepositional verb, in other words a verb+preposition with a special meaning. When the preposition involved is is a Wechselpräposition then you often have to just memorize which case it uses because it doesn't follow the standard logic. That seems to be the case with verlassen+auf since I don't see how "rely on" involves motion, the Wiktionary entry for verlassen lists this under meaning 2; all the grammatical information is listed in the label before the definition. The label says "(reflexive, with auf + accusative)", so it lists the fact that you need a reflexive pronoun, the preposition involved, and the case associated with the preposition.