Die Ausstellungsdauer is actually a noun rather than a prepositional phrase, which would refer to the "duration (die Dauer) of the exhibit(ion)". Similarly you could use the verb dauern ("to last/take [time]"), as in "Wie lange dauert die Ausstellung?" ("How long does the exhibit(ion) last/take?").
For what you're asking, and if you'd rather use Messe instead, you might try,
"Viel Spaß auf der Messe!" (for wishing fun while AT the event)
"Viel Spaß während der Messe!" (for wishing fun DURING the event).
In this case, the preposition auf means "at" and uses the dative case (because it's referring to the person being at a stationary location, not moving toward it, which would need the accusative). The preposition während means "during" and is supposed to use the genitive case regardless, though in colloquial speech it often switches to dative as well. Since we are using a feminine noun here, it is the same form either way, so no worries there.
If you choose to stick with Ausstellung (if it's say maybe a smaller event than a big Messe covering a large parade ground, for example), then you might rather change the auf to in or bei as in
"Viel Spaß bei der Ausstellung!",
still using the dative case. However, with während it would still be the same, as in
"Viel Spaß während der Ausstellung!"