"ad_conn isconnected" should fall through to
"ns_conn isconnected" and that should work. It's conceivable
it's broken in aolserver 4.0 though so you might check
if ns_conn isconnected also returns true.
One other thing is that you should be able to call ad_conn locale outside a session, but maybe something in the i18n stuff snuck in to break that.