Since I upgraded my laptop to OS X Lion, I was not able to connect to my iMac (still running OS X Snow Leopard) anymore. Neither with Screen Sharing nor with direct file access. A quick search in the web couldn’t help me further so I decided to investigate in the issue by myself. The first starting point was to look into the Console and see if there where any error logged while trying to connect to the iMac.
The following error occurred repeatedly in the file. Another search showed me the sources of mDNS but that wouldn’t help me out on that topic.
4/27/12 5:15:09.659 PM mDNSResponder: CacheRecordRmv ERROR!!: How can CurrentAnswers already be zero for 00007F9843836290 _kerberos._udp.MYDOMAIN.LOCAL. (SRV) DNSServer <>:0
But wait, _kerberos._udp.MYDOMAIN.LOCAL remembered me that I joined a domain about half a year ago. Why not simply unjoin my machine from it? But how, the application Directory Utility seems to be gone since OS X Lion. The answer is quite simple. Either through the Finder oder directly at the Terminal open it from the CoreService folder.
$ open /System/Library/CoreServices/Directory\ Utility.app/
Double click on the entry Active Directory and unjoin your Mac! That solved the issue for me and my MacBook Pro running OS X Lion connects to the iMac like a charm.
Good luck to you guys!