Fixing LION AFP File Sharing When it Won’t Connect

On 2 machines I installed LION on, AFP file sharing quit working. I’d get the error there were too many connections to the machine, when in fact there were none. Even AFP saw their where no users. Google a few weeks ago turned up nothing. Today, paydirt !
Here is the solution :
In Lion Search for “AppleFilerServer.plist” – note that you can now once again search for system files in Lion, at least on my once machine.
In /Library/Preferences/com.apple.AppleFileServer.plist there were two keys, maxConnections and maxGuests, that were set to 0. Looked like this:
<key>maxConnections</key><integer>0</integer>
<key>maxGuests</key><integer>0</integer>
I changed the values to 10, and it seems to be working now.
Some how installing Lion is resetting these values, or installing a new file with them set to zero. The 10.7.1 update does not fix the problem, you have to fix it yourself.