Cannot connect to Windows share via local network IP address, but can by localhost

When you posted this question 6 months ago, in my efforts to reproduce your problem I disabled then later re-enabled NetBIOS over TCP/IP in the Advanced TCP/IP Settings of my network adapter. A few weeks later I discovered I was having the same problem described in the OP (except, I did it to myself). I ended up fixing the problem after hours of research which culminated in painstakingly comparing the Registries of a working computer with my non-working machine.

Here's the solution I discovered. (You might want to grab a beer first...)

Step A: Get the GUID of your network adapter

You will need your network adapter's GUID. It looks something like this:

{DED7C856-1234-5678-BA7E-FF9BF300F579}

Here are two ways to get it:

Via PowerShell:

  1. Run this:

    Get-NetAdapter | fl Name,Status,InterfaceDescription,Status,MacAddress,LinkSpeed,InterfaceGuid
    
  2. Make note of the adapter's InterfaceGuid value.

Via Command Prompt (source):

  1. If necessary, use the Services MMC snap-in (run services.msc) to start the Wired AutoConfig service (for wired network interfaces) or WLAN AutoConfig service (for wireless interfaces).

  2. Run the command corresponding to your type of interface:

    Wired:       netsh lan show interfaces
    Wireless:  netsh wlan show interfaces

  3. Make note of the GUID value (it will be displayed without the surrounding braces, which you need to add).

Step B: Edit the Registry

  1. Run regedit to open the Registry Editor.

  2. Navigate to the following key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Linkage

  3. For each of the three values in the table below (Bind, Export, and Route), double-click the value to open the Value data editor.

  4. Inspect the Value data for the strings shown in the Data column of the table below. When the table shows {GUID} replace that with the actual GUID of your network adapter, including the surrounding braces. For example, if your adapter's GUID is {DED7C856-1234-5678-BA7E-FF9BF300F579} according to the table below the Bind value in the Registry should have the following two entries:

    \Device\Tcpip_{DED7C856-1234-5678-BA7E-FF9BF300F579}
    \Device\Tcpip6_{DED7C856-1234-5678-BA7E-FF9BF300F579}
    
  5. Add any Data values that are missing as new lines at the end of the text box. Do this for each value shown in the table.

Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Linkage

+--------+-----------------------------+
| Value  | Data                        |
+--------+-----------------------------+
| Bind   | \Device\Tcpip_{GUID}        |
|        | \Device\Tcpip6_{GUID}       |
+--------+-----------------------------+
| Export | \Device\NetBt_Tcpip_{GUID}  |
|        | \Device\NetBt_Tcpip6_{GUID} |
+--------+-----------------------------+
| Route  | "Tcpip" "{GUID}"            |
|        | "Tcpip6" "{GUID}"           |
+--------+-----------------------------+
  1. Repeat steps 2 through 5 for each of the following tables (for this following table, you'll use the data table for both keys shown):
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Linkage
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Linkage

+-------+-----------------------------+
| Value | Data                        |
+-------+-----------------------------+
| Bind  | \Device\Tcpip_{GUID}        |
|       | \Device\Tcpip6_{GUID}       |
|       | \Device\NetBT_Tcpip_{GUID}  |
|       | \Device\NetBT_Tcpip6_{GUID} |
+-------+-----------------------------+
| Route | "Tcpip" "{GUID}"            |
|       | "Tcpip6" "{GUID}"           |
|       | "NetBT" "Tcpip" "{GUID}"    |
|       | "NetBT" "Tcpip6" "{GUID}"   |
+-------+-----------------------------+
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Linkage

+--------+------------------------------------------+
| Value  | Data                                     |
+--------+------------------------------------------+
| Export | \Device\LanmanServer_Tcpip_{GUID}        |
|        | \Device\LanmanServer_Tcpip6_{GUID}       |
|        | \Device\LanmanServer_NetBT_Tcpip_{GUID}  |
|        | \Device\LanmanServer_NetBT_Tcpip6_{GUID} |
+--------+------------------------------------------+
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Linkage

+--------+-----------------------------------------------+
| Value  | Data                                          |
+--------+-----------------------------------------------+
| Export | \Device\LanmanWorkstation_Tcpip_{GUID}        |
|        | \Device\LanmanWorkstation_Tcpip6_{GUID}       |
|        | \Device\LanmanWorkstation_NetBT_Tcpip_{GUID}  |
|        | \Device\LanmanWorkstation_NetBT_Tcpip6_{GUID} |
+--------+-----------------------------------------------+

Step C: Reboot

Reboot your computer for the changes to take effect.


To automate the Twisty Impersonator solution I have developed a command line program named ShareFix.

Sorry if this looks like an ad but it works.