an attempt was made to access a socket in a way forbidden by its access permissions asp.net mvc code example
Example: An attempt was made to access a socket in a way forbidden by its access permissions.
Disable Hyper-V:
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
After the required restarts, reserve the port you want so Hyper-V doesn't reserve it back:
netsh int ipv4 add excludedportrange protocol=tcp startport=3001 numberofports=1
Reenable Hyper-V:
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All