First use Network and Sharing Center to enable File and Print Sharing
Then run regedit and go to the following key:
In this key enter a 32-bit word value named LocalAccountTokenFilterPolicy with value equal to 1.
Restart the system to activate the change.
To disable this policy delete this value or make it 0.