Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Web-Development

Hello,

I wrote a web service that reads data from a remote server. The client application which uses this web service, is working fine on Windows XP. When trying to run the client application on Vista, I get the following exception:

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions:..."

I am running the client application as an administartor on Vista.

Can somebody tell me whats wrong?

Thank you,

TR

Posted 27-Nov-09 12:05pm
tal1111328
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

Turn off your firewall? If it works, then your firewall is blocking something and you can then do some investigation to figure out exactly what. Once you know that, you can add a rule that opens up whatever your firewall is blocking. According to this page, it could also be that another program is attempting to access the same socket. Perhaps you are not closing the socket correctly before creating a new one, so you are stepping on your own toes. Or maybe another program is attempting to access the same remote server. Not quite sure, but those are some ideas for you to look into.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

Thank you very much,
The firewall caused this problem.
 
TR
  Permalink  
Comments
Bdrap at 4-Feb-13 1:45am
   
My firewall is disabled and my anti-virus as well. I can visit the site through my browser but get the error:
 
2013/02/04 08:23:09 AM ==> Unable to connect to the remote server System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 196.30.46.204:86
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
 
in my web service. Please help ?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Vista sucks. When you get a specific error, googling it in quotes is the best way to find help. I did that for you, and the main thing I found was that having too many SQL Server connections open can cause this error. Someone else solved it by installing the Visual Studio patch for VS 2005 products (including the Express editions) for Vista.  Everyone agreed - Vista sucks.

  Permalink  
Comments
raja mohamed at 9-May-13 5:03am
   
based on this commments i have resolved my issue. Thanks christian.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi,

Thank you. I am working with Visual Studio 2008. Is there also a patch for VS2008?

Do you mean that there are too many SQL connections on the client PC?

TR.

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Does anybody have other suggestions?
  Permalink  
Comments
raja mohamed at 9-May-13 5:04am
   
try to follow christian commment.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

I really don't know, I used google to find an answer for you, I've not had the issue.  They meant too many connections to SQL Server are open.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 7

I am also getting same issue.Please let me know the solution.the above links are broken.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 304
1 Sergey Alexandrovich Kryukov 295
2 Shweta N Mishra 216
3 Maciej Los 210
4 PIEBALDconsult 184
0 OriginalGriff 7,630
1 Sergey Alexandrovich Kryukov 7,022
2 DamithSL 5,586
3 Manas Bhardwaj 4,946
4 Maciej Los 4,525


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 1 Apr 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100