I also have seen this behavior when the
Raspberry Pi is still booting up.
So the page at
dex.local would load, but when I'd get to the
VNC page it would give me a
Server disconnected : code 1006.
What I did was to wait for some time before I could
VNC successfully - this is related to the
Raspberry Pi that's still booting up.
When does this happen to you?
browser are you using?