Fix: Attempt Was Made to Access a Socket in a Way Forbidden

Resetting Internet Information Service has worked for many readers

Reading time icon 4 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

Key notes

  • The error message typically occurs when a process or application attempts to access a network socket but does not have the necessary permissions.
  • Firewall or security software, port restrictions, VPN tools, and antivirus software or security policies may trigger this problem.

A few of our readers have complained about a connection error that throws the notification: an attempt was made to access a socket in a way forbidden by its access permissions.

We have taken the time to investigate the problem. So, in this guide, we will explore the likely triggers and some practical solutions.

Why am I getting an attempt was made to access a socket in a way forbidden by its access permissions?

From our findings, we conclude that any of the following may trigger the error:

  • VPN conflicts – If you use a VPN, it may block important localhost connections or occupy the specified port and will trigger the Bind error.
  • Firewall or security software – Sometimes, specific programs cannot connect to the network or listen on specific ports due to firewall or security settings.
  • Port already in use – It’s possible that another application or process is currently using the network socket. Each socket needs a distinct IP address and port number combination to establish a connection.
  • IP address or network configuration – If you encounter access permission or Bind error, it may be because the IP address is incorrectly assigned or clashes with another device on the network.

How do you fix an attempt was made to access a socket in a way forbidden by its access permissions?

It would be best to try the following workarounds before continuing to more detailed fixes.

  • Disable your firewall or antivirus – If you have a very restrictive antivirus, you should disable it, as this may fix the issue and save you further troubleshooting.
  • Restart your computer – If a minor glitch causes the problem, a restart may force the problematic process to stop and resolve the error.
  • Uninstall VPN – If you use a 3rd-party VPN, uninstall it. We recommend using only the most compatible Windows 11 VPNs to avoid conflicts.

However, if these two pre-solutions do not work, continue to our fixes below.

1. Reset Internet Information Service (IIS)

  1. Press Windows + R to open the Run dialog.
  2. Type cmd and hit Ctrl + Shift + Enter.
    an attempt was made to access a socket in a way forbidden by its access permissions
  3. Input the script below and hit Enter.
    iisreset
    an attempt was made to access a socket in a way forbidden by its access permissions
  4. Once you have reset the service, restart your system and verify if the error persists.

2. Disable Internet Connection Sharing

  1. Press Windows + R to open the Run dialog.
  2. Type services.msc and hit Enter.
    an attempt was made to access a socket in a way forbidden by its access permissions
  3. Double-click Internet Connection Sharing.
    an attempt was made to access a socket in a way forbidden by its access permissions
  4. Set the Startup type to Disabled.
  5. Click Apply and OK, then restart the computer and verify if it fixes an attempt was made to access a socket in a way forbidden by its access permissions.

3. Allow the problematic app through your firewall

  1. Press Windows + R to open the Run dialog.
  2. Type firewall.cpl and hit Enter.
    an attempt was made to access a socket in a way forbidden by its access permissions
  3. Click Allow an app or feature through Windows Defender Firewall on the left pane.
  4. Click the Change Settings button, and grant the problematic app Public and Private rights.
  5. Apply your changes and close the windows, then verify it fixes an attempt was made to access a socket in a way forbidden by its access permissions.

4. Restore the computer

  1. Press Windows + R, type rstrui, and hit Enter.
  2. Click the Next button.
  3. Select a restore point and hit the Next button.
    an attempt was made to access a socket in a way forbidden by its access permissions
  4. Lastly, click the Finish button and wait for the process to complete.

An attempt was made to access a socket in a way forbidden by its access permissions is not a highly complex issue. With these simple solutions, the error is quickly resolved.

Some users may have to reset Windows OS, but note that this may make you lose some valuable data.

This is as much s we shall go through in this guide.

More about the topics: Device Connection Error