Click here to Skip to main content
15,907,497 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi occurred this error while running web service from web application
No connection could be made because the target machine actively refused it 127.0.0.1:8083 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8083

Source Error: 


Line 108:        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/VerifyFingerPrint", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
Line 109:        public string VerifyFingerPrint([System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] byte[] VeriBmp, string empcode) {
Line 110:            object[] results = this.Invoke("VerifyFingerPrint", new object[] {
Line 111:                        VeriBmp,
Line 112:                        empcode});
 

Source File: D:\Mayuri1working\BOBFingerPrint\BOBFingerPrint\Web References\localhost\Reference.cs    Line: 110 

Stack Trace: 


[SocketException (0x274d): No connection could be made because the target machine actively refused it 127.0.0.1:8083]
   System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +239
   System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +35
   System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +224

[WebException: Unable to connect to the remote server]
   System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) +1875405
   System.Net.HttpWebRequest.GetRequestStream() +13
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +103
   BOBFingerPrint.localhost.Service.VerifyFingerPrint(Byte[] VeriBmp, String empcode) in D:\Mayuri1working\BOBFingerPrint\BOBFingerPrint\Web References\localhost\Reference.cs:110
   BOBFingerPrint.Web.FingerPrintDesignPage.btnLogin_Click(Object sender, EventArgs e) in D:\Mayuri1working\BOBFingerPrint\BOBFingerPrint\Web\FingerPrintDesignPage.aspx.cs:41
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

 


--------------------------------------------------------------------------------

i refer this link

No connection could be made because the target machine actively refused it 127.0.0.1:25[^]

but i didn't get any help..:(
please help..:)
thanx
god bless u all...:)
Posted
Updated 13-Feb-22 17:58pm
v2
Comments
venkateshwar500 29-Dec-12 1:47am    
Go through this link http://stackoverflow.com/a/14079317/1577396 might help you.

First update your web service references used in your application.
If web service references are not get updated, then check all files and folder containing source code files in your web service project solution and rebuild it and then update web references used in your project.
Else if its working fine then you need to check your network services used by your development server and windows firewall settings as suggested in above solutions.

I also encountered same problem and I came to know that I was referencing wrong folder having same name but used in another solution.

Enjoy codding.
 
Share this answer
 
Comments
Deepu S Nair 22-Dec-14 2:01am    
Why are you answering for an old question which is already solved?
Amol Shelar101 23-Dec-14 0:09am    
Hello Deepu,
Because I solved that problem in different way according to situation I encountered so if in future any one gone through same condition that person will get help from this.
If there is a problem to reply old questions then tell me another way to convey my message.
It will be appreciated. Thank you for concerning my reply.
Hi,
"Actively refused it" means that the host sent a reset instead of an ack when you tried to connect. It is therefore not a problem in your code. Either there is a firewall blocking the connection or the process that is hosting the service is not listening on that port, this may be because it is not running at all or because it is listening on a different port.

once you start the process hosting your service try netstat -anb (requires admin privileges) to verify that it is running and listening on the expected port.

Refer these links:
http://forums.asp.net/t/1223846.aspx/1[^]
http://stackoverflow.com/questions/2972600/no-connection-could-be-made-because-the-target-machine-actively-refused-it[^]
No connection could be made because the target machine actively refused it 127.0.0.1:25[^]

--Amit
 
Share this answer
 
v2
Comments
MAU787 24-Jul-12 3:30am    
hi..
thanx for reply
my firewall if off
my web service was working fine
not it is showing error like this..
i have not changed any settings..
Jaider Ariza 10-Feb-16 10:00am    
I found that is ESTABLISHED but is not LISTENING. In this case, what to do? eg.
TCP [::1]:PORTX [::1]:MYPORT SYN_SENT
[Fiddler.exe]
TCP [::1]:PORTY [::1]:MYPORT SYN_SENT
[Fiddler.exe]
TCP [::1]:MYPORT [::1]:MYPORT ESTABLISHED
Make sure your connection is not in proxy mode. In Windows 7 go to "Internet Options" in "Connection" tab click on "LAN Settings" and uncheck everything.
 
Share this answer
 
Comments
AlexWang2010 13-Jul-15 16:30pm    
After a few hours' frustration. Finally, and Finally you saved me. THANK YOU!!!

"Make sure your connection is not in proxy mode. In Windows 7 go to "Internet Options" in "Connection" tab click on "LAN Settings" and uncheck everything."

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