Click here to Skip to main content
15,902,112 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my application, it referring to the webservice. Whenever the application tries to connect webservice to fetch data from database, it is throwing "No connection could be made because the target machine actively refused it" error.

But the same file hosted in some other server is working fine, can anyone please help me.
Updated 2-Jun-14 20:17pm
DamithSL 3-Jun-14 2:23am    
are you testing from same machine where you host the service?
Naveen Shet 3-Jun-14 2:25am    
Application, web service and database is in same server.
DamithSL 3-Jun-14 2:30am    
web service is deployed in IIS or you running from visual studio?
is this asmx file or WCF web service?
Naveen Shet 3-Jun-14 2:32am    
Webservice hosted in IIS7.5 and it is asmx
DamithSL 3-Jun-14 2:44am    
may be firewall blocking this port, for testing disable the firewall and test.

You local PC is not accepting connections on port 13828. This will be due to something either not running or not listening on that port.

That number looks a little arbitrary, was it generated by a cassini type visual studio development web server? If so, just change the port to match IIS, port 80 at a guess.
Share this answer
Naveen Shet 3-Jun-14 5:36am    
Yes it is working!!! I have not changed the existing binding for the website with port 80,
added new binding for the website with port 13828. Now the application is working fine.
But not sure how is it secured??? What is the problem in this server then???
The application was not working because the proxy settings seem to be cached and it appeared to have some invalid values in the server.

To resolve this we forced the w3wp to hit the remote service by forcing it to not read the cached proxy by setting usesystemdefault=false.

proxy setting in web.Config, now the application working fine

      <proxy usesystemdefault="False" />
Share this answer
Aravind Garre 3-Jun-14 8:34am    
Enable this(13828) protocol ID in firewall then it will work fine.. same protocol u have to enable in sql services also.try this.

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900