Hi,
I have placed a webservice in the webserver. When I access it from a webpage, default.aspx on a click of a button i get the following error:
No connection could be made because the target machine actively refused it
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.Sock ets.SocketExcep tion: No connection could be made because the target machine actively refused it
Source Error:
Line 91: [System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute("h ttp://tempuri.org/getProducts", RequestNamespac e="http://tempuri.org/", ResponseNamespa ce="http://tempuri.org/", Use=System.Web. Services.Descri ption.SoapBindi ngUse.Literal, ParameterStyle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)]
Line 92: public System.Data.Dat aSet getProducts(int productid) {
Line 93: object[] results = this.Invoke("ge tProducts", new object[] {
Line 94: productid});
Line 95: return ((System.Data.D ataSet)(results[0]));
Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET Files\root\6dce cb27\a382a372\A pp_WebReference s.lgdo8f58.0.cs Line: 93
Stack Trace:
[SocketException (0x274d): No connection could be made because the target machine actively refused it]
System.Net.Sock ets.Socket.DoCo nnect(EndPoint endPointSnapsho t, SocketAddress socketAddress) +1002082
System.Net.Sock ets.Socket.Inte rnalConnect(End Point remoteEP) +33
System.Net.Serv icePoint.Connec tSocketInternal (Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketSt ate state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +431
[WebException: Unable to connect to the remote server]
System.Net.Http WebRequest.GetR equestStream() +1504461
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.Invoke( String methodName, Object[] parameters) +103
localhost.Produ ctsService.getP roducts(Int32 productid) in c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET Files\root\6dce cb27\a382a372\A pp_WebReference s.lgdo8f58.0.cs :93
_Default.btnCat egory_Click(Obj ect sender, EventArgs e) in D:\users\Padmaj amvl\arete\www\ Default.aspx.vb :40
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +105
System.Web.UI.W ebControls.Butt on.RaisePostBac kEvent(String eventArgument) +107
System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring eventArgument) +7
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler sourceControl, String eventArgument) +11
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
System.Web.UI.P age.ProcessRequ estMain(Boolean includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +5102
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.42; ASP.NET Version:2.0.507 27.210
Please tell me what is the error. Its urgent.
Regards.
I have placed a webservice in the webserver. When I access it from a webpage, default.aspx on a click of a button i get the following error:
No connection could be made because the target machine actively refused it
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.Sock ets.SocketExcep tion: No connection could be made because the target machine actively refused it
Source Error:
Line 91: [System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute("h ttp://tempuri.org/getProducts", RequestNamespac e="http://tempuri.org/", ResponseNamespa ce="http://tempuri.org/", Use=System.Web. Services.Descri ption.SoapBindi ngUse.Literal, ParameterStyle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)]
Line 92: public System.Data.Dat aSet getProducts(int productid) {
Line 93: object[] results = this.Invoke("ge tProducts", new object[] {
Line 94: productid});
Line 95: return ((System.Data.D ataSet)(results[0]));
Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET Files\root\6dce cb27\a382a372\A pp_WebReference s.lgdo8f58.0.cs Line: 93
Stack Trace:
[SocketException (0x274d): No connection could be made because the target machine actively refused it]
System.Net.Sock ets.Socket.DoCo nnect(EndPoint endPointSnapsho t, SocketAddress socketAddress) +1002082
System.Net.Sock ets.Socket.Inte rnalConnect(End Point remoteEP) +33
System.Net.Serv icePoint.Connec tSocketInternal (Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketSt ate state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +431
[WebException: Unable to connect to the remote server]
System.Net.Http WebRequest.GetR equestStream() +1504461
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.Invoke( String methodName, Object[] parameters) +103
localhost.Produ ctsService.getP roducts(Int32 productid) in c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET Files\root\6dce cb27\a382a372\A pp_WebReference s.lgdo8f58.0.cs :93
_Default.btnCat egory_Click(Obj ect sender, EventArgs e) in D:\users\Padmaj amvl\arete\www\ Default.aspx.vb :40
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +105
System.Web.UI.W ebControls.Butt on.RaisePostBac kEvent(String eventArgument) +107
System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring eventArgument) +7
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler sourceControl, String eventArgument) +11
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
System.Web.UI.P age.ProcessRequ estMain(Boolean includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +5102
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.42; ASP.NET Version:2.0.507 27.210
Please tell me what is the error. Its urgent.
Regards.
Comment