There are numerous factors that can trip up Windows File/Print Sharing. Unfortunately because there are so many factors, it can take some testing to figure out the exact cause in any given scenario.
TL;DR/DIY: Skip to the Summary
Windows Vista changed the way that File/Print Sharing works. Instead of just setting the same workgroup name like in XP, you now have to create a homegroup as well and set the network type (public/private (home)/domain).
Configuring File/Print Sharing should be easy by default, but once you start changing settings or using third-party security software, it becomes quite tricky to make sure everything is set correctly again because there are so many factors.
If you want to share, set the network type to private. If you do not want to share, set the network type to public. It may seem counterintuitive, but it makes sense: in a public network, you want to lock down the sharing settings, but want more lax sharing in a private network.
There are no less than four Windows services that must be running in order for File and Print Sharing to work correctly and fully:
- Computer Browser
- TCP/IP NetBIOS Helper
Open the Services MMC snap-in (
services.msc) and make sure that those for are running and set to Automatic start. Open Network Places again and refresh. If it doesn’t work, try again in a minute or two.
Personally, I don’t like having all those extraneous services running all the time, even when I’m not using File/Print Sharing. As such, I have created two batch files that let me turn them on and off as needed without having to manually start or stop each individual service:
net start browser
net start server
net start lmhosts
net start lanmanworkstation
net stop browser
net stop server
net stop lmhosts
net stop lanmanworkstation
In addition to the service, NetBIOS must be enabled on your network adapter as well:
While it seems like an obvious step, also make sure that File/Print Sharing is installed and enabled for the active network adapter, particularly if more than one network adapter is installed:
Also make sure that the DNS settings are the defaults if you don't specifically need to change them because these settings can affect visibility to and from the LAN:
Finally, make sure that the system name and domain/workgroup are configured correctly for your network; for example:
NB: Ensure that the computer and workgroup names are valid. The official Windows interface prevents using invalid characters or making it too long, but third-party software does not necessarily prevent that. This can cause problems with network discovery.
Another common cause of File/Print Sharing not working is that a firewall closes a required port. Windows File/Print Sharing requires TCP and UDP ports 135-139 to be open.
Check your security software (firewall, anti-virus, proxy programs) to ensure that the necessary ports are not being blocked. File/Print Sharing has historically been a potential vulnerability and so frequently locked down. You can run a test with ShieldsUP!.
Have you installed or changed the settings of any security software like firewalls, antivirus, etc. recently? Those kinds of programs often like to fiddle with various aspects of the OS to lock things down, and if you set "privacy" setting or something, it may block or disable an aspect of Windows. For example, the WWDC (Windows Worms Doors Cleaner) is a great way to harden Windows XP, but setting it to maximum security has the side-effect of disabling F&P Sharing, the Task Scheduler (and thus the prefetcher), etc.
Check your security programs' settings for an option related to sharing.
In addition, make sure the Windows Firewall is configured correctly in case you have changed something a while back. You can compare to a complete listing of (default) Windows Firewall rules for File/Print Sharing from a system with File/Print Sharing functioning correctly.
Misery, Meet Company
Plenty of other people have had similar problems with File/Print Sharing.
All these people ended up having to either modify their network configuration (public/private/home/homegroup/etc.) to match that of the rest of the network, or reset/disable the Windows Firewall (or one of the other items listed in this answer). One person linked to a file that may or may not help fix this issue.
This person had a problem with File/Print Sharing that was fixed by resetting the Windows Firewall rules, and there is also a guide linked in that thread which shows a couple of steps involving changing the default sharing settings that are supposed to help.
In this thread, resetting the TCP/IP stack was suggested as was removing extraneous 6to4 adapters.
Network discovery is a network setting that affects whether your computer can see (find) other computers and devices on the network and whether other computers on the network can see your computer. By default, Windows Firewall blocks network discovery, but you can enable it.
At least as a temporary diagnostic step, turn off your antivirus and Windows Firewall. It is not as simple as you would think; it requires a whole one-minute video to show how to do it.
These people solved it by disabling the Windows Firewall altogether.
Here are two official Microsoft help pages that discuss fixing File/Print Sharing and computers not showing up in a network. They also have two troubleshooters:   for resolving these issues.
When File/Print Sharing is not working, make sure that:
File/Print Sharing is correctly installed and enabled in all ways: services, NICs, ports
All settings are correct and match the rest of the network, including computer and workgroup names, type of network, and network settings
Security software (third-party or not) is properly configured, disabled, or uninstalled
If after all this, you system is still messed up and File/Print Sharing is still not working correctly, then you may as well resort to generic fix-it steps like
repair install, or even