If you are running XAMPP or WAMP or any other web server on your local computer, and you face the “Localhost refused to connect” error message, then there is likely something wrong with your configuration. This can also include scenarios where your localhost does not correspond to 127.0.0.1 correctly or when you have insufficient permissions to access the file. Localhost or 127.0.0.1 is the ip address of the web server running on your computer, not on the web and you can access it even if you do not have an internet connection.
Localhost corresponds to any web server running on the computer that you try to access it from. Testing apps, making changes to the current apps and doing any other development work on your local computer is better than doing it on an online or production server. That way you can test the bugs and get rid of them without needing to mess up your working application running on an online web server or in a production environment. You would be able to test the application to make sure it works correctly and won’t cause any downtime or other issues when it is live in the production environment. There are even cases when you want to develop an application in an editor like Microsoft’s Visual Studio / Visual Studio Code, which you can use to develop Android apps, and you face this error when you want to connect your project to a webserver running on your machine or a web server package provided by the editor itself.
There are plenty of reasons why this error occurs, and the exact cause of this error depends on the root causing it. Therefore, before we get started with showing you how to solve this problem, let us first go through the possible causes of the error in order to establish a better understanding of the issue.
- Localhost isn’t corresponding to 127.0.0.1 — There might be cases when localhost on your machine isn’t correctly corresponding to 127.0.0.1. If that’s the reason, you wouldn’t be able to access your local web server by typing localhost in the web browser or by pinging localhost from the command prompt.
- Using WSL on Windows to run a web server — Sometimes, the LxssManager Service on Windows is the culprit if you are running a web server inside a linux distribution on a windows subsystem for linux.
- Port 80 is used by another application on your computer — In some cases, this error can occur if port 80 on your computer is used by any other application on your computer. Skype used to use port 80 back in the days and you wouldn’t be able to run an apache server on WAMP or XAMPP while simultaneously running Skype on your windows computer as well.
- Accessing your web server from a wrong port — It might be likely that your web server is configured to use another port rather than the default port 80, and you are trying to access it by typing localhost in your browser which defaults to localhost:80 i.e port 80. If that’s the case, then you would get this error message.
- Insufficient Permissions — In some scenarios, this error can arise if you are trying to access a file or directory in the local web server which isn’t permitted to be accessed by your user.
Now that we have already told you about some of the reasons why this error arises on a Windows computer. Now, let’s see what you can do to fix or get rid of this error and continue your web development journey.
Change Apache Web Server Port in XAMPP or WAMP
First off, the most common way to resolve this error is by changing the port of the apache web server if you are using XAMPP or WAMP on windows. Usually, some other web application that you might be running on your computer can get the hold of port 80 and it is blocked/not accessible to an application like apache. Thus even though apache is running, it won’t be able to fetch web pages on that particular port.
Change Apache’s port in XAMPP
In order to change the running port of apache web server in XAMPP, do the following:
- First of all, start XAMPP from the Start Menu.
- Then, in the system tray portion of your taskbar you would see the XAMPP icon, double click on it.
- You would now see the XAMPP Control Panel Window. In that window, you would see a list of services that are currently running i.e apache, mysql etc.
- Next to the service name, there would be a button called “Stop”. Click on Stop in front of the apache service.
XAMPP Control Panel - Next open windows explorer, and go to C:\xampp\apache\conf directory. There, look for a file named httpd.conf.
Opening up HTTPD Config File - Open it with Notepad or any other editor that you want. Inside the file, search for these two lines.
Listen 80 ServerName localhost:80
Replacing ServerName in HTTPD Config File - Once you have found them, replace them with the following:
Listen 8080 ServerName localhost:8080
- Now, save the file. It would ask for administrative privileges when you save the file. Click on Yes when the dialog box appears.
- Now open the XAMPP control panel again, and start the apache web server.
- If the error was caused by a conflicted port number, then doing this would have solved it.
Change Port Number of Apache Web Server in WAMP
To change the port number of the apache web server in wamp, first you need to close WAMP.
- To do that, open the Task Manager by right-clicking on your taskbar and choosing Task Manager from the menu that appears.
Opening up Task Manager - Once the Task Manager is open, see if any instances of WAMP are running. If they are, just click on the good old “End Task” button to stop them.
- Now, open Windows Explorer by double clicking the My Computer icon on your desktop. Navigate to the C:\wamp\Apache2\conf folder and open the file named httpd.conf with notepad or any other editor of your choice.
- Afterwards, search for these two lines in that file:
Listen 80 ServerName localhost:80
Replacing ServerName in HTTPD Config File - After locating these lines, replace them with the following instead:
Listen 8080 ServerName localhost:8080
- That’s it, save the file. And open WAMP again and see if you still face this error.
Access Localhost by Using 127.0.0.1
As we have mentioned earlier, one of the reasons the error message in question may appear is that, in some cases, the localhost isn’t corresponding to 127.0.0.1 which is the address of your local web server.
In order to fix that problem, start the web server by launching XAMPP or WAMP and go to your browser and type 127.0.0.1 and press Enter. If you are able to access the web server using this, then it means localhost isn’t pointing to this ip, and you would need to access any projects/files on your web server by typing 127.0.0.1/filename instead of localhost/filename.
Restart LXSSManager Service (For Web Servers running on WSL)
If you are using the Windows Subsystem for Linux on your computer to run a web server, as some people might do to develop Nodejs applications etc, while facing this error, then the simplest thing you can do is to restart LXSSManager service. To do this, follow the instructions that are given down below:
- First of all, open up the Run dialog by pressing the Windows key + R shortcut on your keyboard.
- When the Run dialog box runs open up, type in services.msc and press Enter.
Opening up Windows Services - This will open up the Windows Servers app where you will see a list of all the services currently available on your computer.
- In the Services window, search for the service named LxssManager.
- Right click on it and select Restart from the drop-down menu. Alternatively, you can double-click on it to open up the Properties window and then stop it. Finally, click Start again to complete the restart.
Restarting LxssManager Service - When done, see the web server again. Hopefully, it would be working now if it was caused by an issue with LxssManager service.
Access Localhost with the Port Number
As it turns out, another solution for the error message in question is if your web server isn’t running on the default port 80, you can access the local web server by specifying the port number as well. Usually, the port number is either 80 or 8080.
To do that, you have to type localhost:8080 in your browser. Note that you don’t have to type localhost:80 as 80 is the default port used by your web browser whenever it accesses any website or a web server, be it online or offline.
Delete Application Config File (if applicable)
If you are using Visual Studio and doing some asp.net programming and you face this error, then don’t worry, we have got a fix for you. What you need to do is delete the application.config file that is located inside a folder called .vs. In some cases, this folder can be hidden so make sure that you are able to see hidden files in your Windows Explorer window. Follow the instructions given down below to do this:
- First of all, open your project folder and then open up the .vs folder. If you are not able to see this folder, that’s because it is hidden. You will have to edit your folder options in the Windows Explorer window to be able to see hidden files and folders.
Hidden .vs Folder - Once inside the .vs folder, open the config folder.
- Inside the config folder, delete the application.config file.
- That’s it, if you were using IISExpress and doing some asp.net projects, then this would have hopefully fixed the problem of visual studio not being able to connect to localhost.
Kamil Anwar
Kamil is a certified MCITP, CCNA (W), CCNA (S) and a former British Computer Society Member with over 9 years of experience Configuring, Deploying and Managing Switches, Firewalls and Domain Controllers also an old-school still active on FreeNode.
The «localhost refused to connect» error occurs when there is a network connectivity issue, such as an overly restrictive firewall or misconfigured port settings. Identifying the source of the error can be challenging due to the number of factors that can contribute to the issue.
This article explains the most common causes of the «localhost refused to connect» error and shows how to resolve it.
Prerequisites
- Administrative privileges on a Linux, Windows, or macOS system.
- XAMPP installed (optional).
- WAMP installed (optional).
What Causes the «localhost refused to connect» Error?
The localhost hostname is reserved for the loopback network interface. This interface allows users to connect to network services on the host system.
When a user pings localhost, the request remains on the local network, and the server forwards it to the host machine. If such a connection is impossible, the browser displays an error message.
Two errors result in the browser showing the «localhost refused to connect» message:
- ERR_CONNECTION_REFUSED means that the server rejected the connection request.
- ERR_CONNECTION_TIMEOUT appears when the server has not responded to the connection request.
The following is a list of common causes that result in localhost refusing to connect:
- The firewall blocks the loopback IP address. Misconfigured or overly strict firewalls may block the localhost address and prevent the traffic from reaching the destination.
- localhost does not resolve to the correct IP address. 127.0.0.1 is the default loopback address used by localhost. If localhost resolves to another address, additional configuration may be necessary.
- Apache issues block localhost. These issues can arise from misconfigured Apache Web Server settings.
- DNS cache is corrupted. Corrupted cached DNS records may prevent localhost connections.
- The server is being accessed from the wrong port. Apps communicate with the network using an IP address and a port. Wrong port settings may prevent localhost from connecting even if the loopback IP address is correctly set up.
- Browser settings are blocking the connection.
How to Fix the «localhost refused to connect» Error
To resolve a localhost issue, eliminate potential reasons until you identify the source of the problem. The sections below provide troubleshooting steps to fix the «localhost refused to connect» error.
Temporarily Disable the Firewall
Check whether the firewall settings block the localhost connection by temporarily disabling the firewall. Read the sections below for OS-specific instructions.
Note: For security reasons, remember to turn the firewall back on after this step.
Disable the Firewall on Linux
The firewall configuration tool on Linux systems varies depending on the distro. While Ubuntu and Debian distributions use UFW, Rocky Linux, AlmaLinux, and RHEL systems use firewalld by default.
To disable the UFW firewall on Ubuntu/Debian, open the terminal window and run the following:
sudo ufw disable
Check the status by running:
sudo ufw status
To disable firewalld on Rocky/RHEL, use the command:
sudo systemctl stop firewalld
Verify the status is inactive by running:
sudo systemctl status firewalld
Disable Firewall on macOS
Follow the steps below to turn off the firewall on macOS using the System Settings app:
1. Click the Apple icon in the upper-left corner to open the menu and select System Settings.
2. Navigate to Network settings and select Firewall.
3. Turn off the firewall to complete the process.
Disable Firewall on Windows
Disable the Windows Defender Firewall by executing the following steps:
1. Press Windows + R to open the Run command window.
2. Type control and click OK.
A Control Panel window opens.
3. Select System and Security.
4. Select the Windows Defender Firewall option.
5. Choose Turn Windows Defender Firewall on or off in the menu on the left side of the window.
6. Disable Windows Defender Firewall.
Check Localhost IP Address
The localhost hostname and the loopback IP address 127.0.0.1 are not always the same thing, e.g., IPv6 systems link the localhost to the address 0:0:0:0:0:0:0:1. Also, localhost can link to any local IP address if the host file has been modified.
Troubleshoot the «localhost refused to connect» error by entering 127.0.0.1 in the browser search bar. If the browser establishes the connection with localhost, the error was caused by the faulty localhost hostname mapping in the host file.
Check Apache Server Status
Apache server needs to run correctly to enable localhost access. The command to check whether Apache runs on a Linux OS depends on the distribution.
Follow the steps below and use the appropriate command:
1. Verify Apache status on Ubuntu and Debian with the following command:
sudo systemctl status apache2
On Rocky Linux and RHEL, the Apache service name is httpd:
sudo systemctl status httpd
The output should show Apache as active (running). If Apache is not working correctly, the output displays an inactive (dead) status.
2. To fix the issue, try restarting the service. To restart the Apache service on Ubuntu and Debian, execute the command below:
sudo systemctl restart apache2
On Rocky Linux and RHEL, type:
sudo systemctl restart httpd
Recheck the Apache status. If the web server remains inactive, reinstall Apache.
Flush DNS
A DNS cache speeds up the loading of previously visited websites. If DNS collects too many records or some records get corrupted, localhost may refuse to connect.
The best way to ensure DNS is not preventing the localhost connection is to clear (flush) the DNS cache and remove all saved DNS lookup information.
The steps for flushing the DNS vary depending on the OS in use:
- To flush DNS on Linux, execute the following command:
sudo /etc/init.d/nscd restart
- On macOS, use the
killall
command below:
sudo killall -HUP mDNSResponder
- Flush DNS on Windows with the
ipconfig
command:
ipconfig /flushdns
Change Port Settings
By default, localhost uses port number 80. If another application uses the same port, it can create a conflict, resulting in localhost refusing to connect.
The following sections describe how to change port settings on two popular stacks, XAMPP and WAMP.
Change Port Number on XAMPP
If you are using the XAMPP stack, follow the steps below to change the Apache Web Server port:
1. Open the XAMPP manager:
sudo /opt/lampp/manager-linux-x64.run
2. Click the Manage Servers tab.
3. Choose the Apache Web Server from the server list and select Configure on the right side of the window.
4. Type another port number in the Port field, e.g., 8080.
5. Click OK and select Yes in the pop-up to confirm the changes and restart the server.
Change Port Number on WAMP
Follow the steps below to change the Apache port with the WAMP software stack:
1. Stop all instances running in WAMP.
2. Open the httpd.conf file located in C:\wamp\apache2\conf.
3. Locate the Listen directive in the file and change the port number from 80 to a free port, e.g., 8080.
4. Find the ServerName value and change the port number to the one defined in the Listen directive.
Save the changes and exit the file.
Check Browser Settings
Browsers often automatically redirect HTTP addresses to HTTPS, causing the «localhost refused to connect error.» Navigate to localhost in a different browser to ensure the browser is not responsible for the error.
If the connection is established, follow the steps below to troubleshoot the DNS configuration issues on the faulty browser.
Change DNS Settings in Chrome
The procedure below describes how to remove localhost from Chrome’s dynamic HSTS policy, which automatically redirects HTTP to HTTPS:
1. Paste the following URL in the address bar:
chrome://net-internals/#hsts
2. Select Domain Security Policy from the menu on the left side of the window and scroll down to the Delete domain security policies section.
3. Add localhost as the domain name and click Delete.
4. Restart the browser to apply the changes.
Change DNS Settings in Firefox
Disable the HTTPS-only mode in Firefox to test if it resolves the localhost issue:
1. Select Settings from the Application Menu in the top right corner of the browser window.
2. Navigate to Privacy & Security and scroll to the HTTPS-Only Mode section.
3. Select Don’t enable HTTPS-Only Mode.
Restart the browser to apply the changes.
Conclusion
After reading this article, you can troubleshoot the cause and fix the «localhost refused to connect» error. The article presented multiple ways to resolve the error on all major operating systems.
Next, speed up and streamline web application deployment by learning how to install Apache on Docker.
Was this article helpful?
YesNo
Ok, so I just read a few threads about how to fix this error. None of them worked for me, my reg was already good to go and everything else seemed to be in working order except for accessing this server at \\wsl.localhost (the Linux shortcut in navigation pane).
Well guess what?
TURN ON NETWORK DISCOVERY!!!! xD
Did that for private networks, and now it is working seamlessly. I can finally click “Linux” in explorer quick access again and see all my distros.
1 reply
Hey, for all the Windows 11 Pro People,
This link resolved my issues.
As a quick note for clarity, change the keys of «ProviderOrder» in both the «Order» and «HwOrder» sections. Even If you see the «P9NP» if that line, you need to move that key to the front, or else it won’t work. Mine «P9NP» key wasn’t missing, it was just at the back, which caused this issue.
Hope that helps!
Thanks. I tried, but that didn’t make it for me. Any other ideas?
PS C:\Windows\system32> reg query HKLM\SYSTEM\CurrentControlSet\Control\NetworkProvider /s
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder
ProviderOrder REG_SZ P9NP,cbfsconnect2017,RDPNP,LanmanWorkstation,webclient
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order
ProviderOrder REG_SZ P9NP,cbfsconnect2017,RDPNP,LanmanWorkstation,webclient
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\ProviderOrder
LanmanWorkstation REG_DWORD 0x7d0
P9NP REG_DWORD 0x1f4
RDPNP REG_DWORD 0x3e8
webclient REG_DWORD 0xbb8
cbfsconnect2017 REG_DWORD 0xfa
PS C:\Windows\system32>
0 replies
Finally I got it working doing this:
At first I was getting no access, then making this changes in registry made it:
- have P9NP first for both HwOrder and Order
- remove from both the «cbfsconnect2017»
PS C:\Windows\system32> reg query HKLM\SYSTEM\CurrentControlSet\Control\NetworkProvider /s
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder
ProviderOrder REG_SZ P9NP,RDPNP,LanmanWorkstation,webclient
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order
ProviderOrder REG_SZ P9NP,RDPNP,LanmanWorkstation,webclient
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\ProviderOrder
LanmanWorkstation REG_DWORD 0x7d0
P9NP REG_DWORD 0x1f4
RDPNP REG_DWORD 0x3e8
webclient REG_DWORD 0xbb8
cbfsconnect2017 REG_DWORD 0xfa
PS C:\Windows\system32>
After reboot it gets somehow reset, cbfsconnect2017 becomes first again, but now P9NP is second, but access works
PS C:\Windows\system32> reg query HKLM\SYSTEM\CurrentControlSet\Control\NetworkProvider /s
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder
ProviderOrder REG_SZ cbfsconnect2017,P9NP,RDPNP,LanmanWorkstation,webclient
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order
ProviderOrder REG_SZ cbfsconnect2017,P9NP,RDPNP,LanmanWorkstation,webclient
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\ProviderOrder
LanmanWorkstation REG_DWORD 0x7d0
P9NP REG_DWORD 0x1f4
RDPNP REG_DWORD 0x3e8
webclient REG_DWORD 0xbb8
cbfsconnect2017 REG_DWORD 0xfa
PS C:\Windows\system32>
2 replies
That was the final trick my friend! My savior. Thankies.
Thanks. This trick worked.
same error, same fix, thanks! XD
0 replies
0 replies
0 replies
0 replies
Administrative or Admin shares have been available on most Windows client Operating systems for a long time. It is a hidden share on the computers, mainly used for remote file management by the administrators. As we are talking about the ‘Network Shares’, you have the working network setup. Follow the below steps if you face the issue of admin share not working on Windows 10, 11 or Windows 7 computers.
By default, all the local drives (Partitions) are shared for administrators to access over the network. These types of shares are called admin or administrative shares in Windows OS. It usually can be accessed by typing the Computer IP address or name with a partition letter and dollar ($) sign at the end, as shown below.
Prerequisites for Working Administrative Shares
Before further troubleshooting the administrative shares not working issue in Windows 10/11, let us understand the requirements.
- Working network: Make sure the computers are on the LAN network where they can communicate with each other. Simply try the ping command and confirm the network connectivity.
- Same Domain or Workgroup: As we are talking about a workgroup network typically applicable for home or small office (where no domain and Active Directory network exist), both computers should be in the same workgroup. If you have not changed it manually, then mostly all PCs will be on the default workgroup as below. If not, you need to change and reboot the computer. The same condition is applicable in the domain environment.
- Administrative access on the destination: You must have administrative access (Admin username and password) on the destination computer. As it is called ‘Administrative Shares’ only the administrators (or the users who are part of the administrator group) can access them over the network. It doesn’t matter if you are the admin of your (source) computer; you must have admin access on other remote computers.
- Status of Administrative Shares: It is shared by default, but the administrator can remove it for security purposes. If C$ or other admin shares are disabled manually, then it will not work. So, check and confirm that the admin shares are active. We can see them under Computer Management in Windows 10/11 and others.
- Check Firewall and Security Softwares: Some of the 3rd party security software and personal firewalls may disable the admin shares to improve the computer’s data security. Also, if any firewall or network policies block the file sharing TCP/IP protocols, it will impact the Administrative share access over the network.
If the above requirements are checked and met, follow the steps below.
It is a modification in the Windows OS registry which worked straightaway in my example. Take extra precautions while modifying the registry; take a backup before proceeding further.
How to Fix When you Can’t Access C$?
Check Admin Share on Local PC:
As described earlier, the Computer Management -> Shared Folders -> Shares will show the active shares of the local PC.
Also, we can use the below command to find out from the command prompt or PowerShell.
net share
Find Administrative Share on Remote PC
If you have appropriate access on the remote computer, the below command will output the admin shares on the remote computer.
net view \\computername /all
You can use the IP address instead of computer name as well.
Follow the steps if you can’t access C$ or other admin shares on the remote computer (after checking the above 5 prerequisites)
1) Open registry on the remote Windows 10/11 computer – Open the Run dialogue box and type ‘regedit’
2) Go to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
3) Add a new value DWORD (32 Bit or 64 Bit, depending on OS version), name it LocalAccountTokenFilterPolicy and give value 1.
Restart the computer and check the admin share now. It must work.
Example of registry
With the above 5 prerequisites and this registry modification, you should be able to fix the administrative shares not working in Windows 10/11 and even Windows 7.
Check the below video for more information:
Друзья, добро пожаловать в еще одну статью-инструкцию по разрешению ваших сетевых проблем на ВайФайГиде. На связи Ботан. Сегодняшняя ошибка многолика – она проявляется и на Windows 10, и на Windows 7, может иметь разные наименования, ее проявление зачастую опирается на погоду (шутка, но порой так и думаешь), а главное – она связана с проблемами доступа к сети в операционных системах Windows. Переходим к проблематике.
Если что-то есть дополнить или осталась за кадром своя веселая история, связанная с этой ошибкой – смело пишите в комментарии. Поможете другим читателям с такой же проблемой.
Содержание
- Проявления ошибки
- Решения проблемы
- Странное решение от меня
- Быстрый способ – реестр
- Шаг 1 – Проверяем настройки общего доступа
- Шаг 2 – Запускаем Службы
- Шаг 3 – Сетевая карта
- Шаг 4 – Диспетчер устройств
- Шаг 5 – Олицетворение
- Шаг 6 – SMB1
- Задать вопрос автору статьи
Проявления ошибки
Уже сказал выше, что ошибка всплывает на всех версиях Windows – и более чем часто на современных Windows 7, Windows 8, Windows 8.1, Windows 10.
Может иметь разные по сути названия с одним смыслом. Сетевая ошибка:
- Windows не может получить доступ к сетевой папке, диску, иному расположению в локальной сети
- Windows не может получить доступ к компьютеру в локальной сети. Не найден сетевой путь. Код ошибки: XXXXXXXX
- Windows не может получить доступ к ВАШАПАПКА. Разрешение на доступ к ВАШАПАПКА отсутствует. Обратитесь к сетевому администратору для получения доступа.
- Windows не может получить доступ к компьютеру. Проверьте правильность написания данного имени.
И самое гениальное – если вчера все работало отлично, не факт, что с утра будет так же. Именно в таком случае по большей части и оказываются читатели этой статьи – вроде бы все настроено правильно, но по факту ничего не работает и нет доступа к сетевой папке.
Для справки: типичные коды ошибок – 0x800070035, 0x80004005 или 0x800704cf.
Друзья, если у вас не видит вообще каких-то папок – рекомендую прочитать ЭТУ СТАТЬЮ ОТ БОРОДАЧА. Там же можно посмотреть и другие способы разрешения сетевых проблем, все эти ошибки очень похожи, универсального одного способа не существует, поэтому приходится писать столько много в основном бесполезного текста.
Решения проблемы
Здесь и далее я считаю, что вы грамотно раздали все по сети. Если не уверены в своих первоначальных действиях, рекомендую прочитать нашу статью по расшариванию файлов и папок по локальной сети.
После каждого этапа можно смело перезагружаться и проверять.
Странное решение от меня
Очень быстрое и странное дополнение от меня. Бывает такое, что сеть настроил вроде бы нормально, оно даже вчера работало, одинаковые версии Windows 10, все права назначены – но вот хоть об стену вываливаются вышеуказанные ошибки. Щелкаешь по папкам – а не дает войти (еще хуже, когда не дает войти в сам компьютер в сетевом окружении или вообще там ничего не видно).
Лично я в таком случае захожу на втором компьютере тоже в Сеть – как правило там начинается поиск, или даже делаются какие-то запросы-разрешения. Суть – второй компьютер обычно видит первый. И самое интересное – после такой манипуляции первый компьютер тоже успешно начинает работать со вторым. Необъяснимая магия, которая может продолжать работать месяцами без всяких сбоев.
Быстрый способ – реестр
Вся проблема этих доступов связана как раз с той самой подсистемой доступа. А почему бы нам ее и не заглушить на корню? Для больше части людей такая правка в реестре начисто исправляет ситуацию. Рекомендую попробовать, но если что – просто сделайте все как раньше.
- Запускаем реестр. Не знаете как это сделать?( Для Windows 10 – щелкаем правой кнопкой мыши по кнопке Пуск и запускаем «Выполнить». В появившемся окошке вводим regedit.
- Раскрываем папки в редакторе реестра вот по этому пути:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
- Добавляем сюда параметр AllowInsecureGuestAuth, тип DWORD, значение 1 (Enabled).
Данный способ особенно актуален для Windows 10 Home, где доступа к редактору локальной GPO попросту нет. Зато работает как часы. Опытные могут сделать это же через команду (но для надежности лучше протыкать вручную):
reg add HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters /v AllowInsecureGuestAuth /t reg_dword /d 00000001 /f
Шаг 1 – Проверяем настройки общего доступа
Теперь приступаем уже к основной части, если прошлые вдруг чего-то не исправили моментальные проблемы системы. Начнем все-таки с базы, а вдруг вы чего-то неверно выставили в настройках (хотя я вам охотно верю, что все сделали правильно).
Напоминаю, что предоставление доступа к папке или диску проходит в два этапа: доступ нужно разрешить в нескольких местах.
- В первый раз на вкладке «Доступ» мы щелкаем по большой кнопке «Общий доступ», а на следующем окне добавляем ВСЕХ пользователей:
- Теперь переходим здесь же в «Расширенную настройку» и делаем примерно как на рисунке:
Очень надеюсь, что вы изначально давали доступ точно так же. Некоторые рекомендуют пользоваться пунктом «Поделиться» в Windows 10 для расшаривания в домашней сети, но чего-то на практике это вносит только путаницу. Лично я как старовер пользуюсь дедовскими методами. Не получается? Едем дальше.
Шаг 2 – Запускаем Службы
За доступ ко всем радостям совместного пользования папок отвечает служба «Сервер». Иногда она выключена – включаем:
- Идем в Службы (мне проще всего запускать их через Поиск в системе):
- Ищем в списке «Сервер». Если не работает – запускаем (или через правую кнопку, или двойным щелчком через общие параметры, на ваш вкус). Статус видно прямо здесь:
В настройках запуска можно выбрать автоматическое включение, а то вдруг что-то ее выключило, и после перезагрузки она в итоге и выключается. Проверьте.
Шаг 3 – Сетевая карта
Обычно причина редко связана с этим пунктом, но попробовать ведь никто не запрещает.
- Ищем вашу сетевую карту (идем в Параметры сети и интернет – Настройки параметров адаптера (на десятке) или в Центр управления сетями и общим доступом – Изменение параметров адаптера (на семерке)). Выбираем ВАШ сетевой адаптер, через который вы подключены к сети, щелкаем правой кнопкой мыши по нему и выбираем «Свойства»:
- Пробуем СНЯТЬ галочку в списке с IPv6 (IPv4 оставляем включенным):
- Теперь выбираем IPV4 (галочку не трогаем), а щелкаем по кнопке «Свойства»:
- «Дополнительно»:
- WINS – Параметры NetBIOS – По умолчанию (если же вдруг вручную задаете IP-адреса в сети, рекомендуется его Включить здесь):
Шаг 4 – Диспетчер устройств
Еще один маловероятный случай.
- Идем в «Диспетчер устройств» (снова правой кнопкой мыши по Пуску, ну или пользуйтесь поиском).
- Вид – Показать скрытые устройства (иначе будет не видно)
- Удаляем устройства 6to Еще одна завязь на IPv6 протокол.
Шаг 5 – Олицетворение
Лично мне это направление тоже не нравится, но были и те, кому помогло. Поэтому пропускать было нельзя.
- Через Поиск ищем «Службы компонентов». Запускаем.
- Идем по пути: Службы компонентов – Компьютеры – Мой компьютер:
- Щелкаем по «Мой компьютер» правой кнопкой мыши и выбираем «Свойства».
- Далее идем во вкладку «Свойства по умолчанию». Уровень проверки подлинности – По умолчанию. Уровень олицетворения – Олицетворение:
Шаг 6 – SMB1
На случай если сопрягается новая «десятка» со старыми версиями Windows. По умолчанию в ней отключен протокол SMB1. Для разрешения придется идти в «Программы и компоненты» (лучше через Поиск) – «Включить и выключить компоненты Windows» и ставить ее вручную (SMB 1.0 / CIFS File Sharing Support).
Если вы нашли свое решение, обязательно рекомендую поделиться им в комментариях. Ошибка не такая уж и простая, но порой решается очень странным простым способом. Решили сами и поделились – помогли кому-то сберечь пару седых волосков. Спасибо!