Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET WebService
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..Frown | :(
please help..Smile | :)
thanx
god bless u all...Smile | :)
Posted 23-Jul-12 21:56pm
MAU7871.6K
Comments
venkateshwar500 at 29-Dec-12 1:47am
   
Go through this link http://stackoverflow.com/a/14079317/1577396 might help you.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
v2
Comments
MAU787 at 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..
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

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.
  Permalink  
Comments
Deepu S Nair at 22-Dec-14 2:01am
   
Why are you answering for an old question which is already solved?
Amol Shelar101 at 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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  

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

  Print Answers RSS
0 Zoltán Zörgő 300
1 /\jmot 180
2 CHill60 145
3 Peter Leow 140
4 CPallini 135
0 Sergey Alexandrovich Kryukov 9,383
1 OriginalGriff 6,881
2 Peter Leow 4,607
3 Zoltán Zörgő 4,284
4 CHill60 2,892


Advertise | Privacy | Mobile
Web04 | 2.8.150129.1 | Last Updated 22 Dec 2014
Copyright © CodeProject, 1999-2015
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