473,503 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Net.Sockets.SocketException+webservice+Sour abh Das

5 New Member
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.Sockets.SocketException: No connection could be made because the target machine actively refused it

Source Error:

Line 91: [System.Web.Services.Protocols.SoapDocumentMethodAt tribute("http://tempuri.org/getProducts", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse .Literal, ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Wrapped)]
Line 92: public System.Data.DataSet getProducts(int productid) {
Line 93: object[] results = this.Invoke("getProducts", new object[] {
Line 94: productid});
Line 95: return ((System.Data.DataSet)(results[0]));


Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\root\6dcecb27\a382a372\App_WebReferences.lgd o8f58.0.cs Line: 93

Stack Trace:


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

[WebException: Unable to connect to the remote server]
System.Net.HttpWebRequest.GetRequestStream() +1504461
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String methodName, Object[] parameters) +103
localhost.ProductsService.getProducts(Int32 productid) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\root\6dcecb27\a382a372\App_WebReferences.lgd o8f58.0.cs:93
_Default.btnCategory_Click(Object sender, EventArgs e) in D:\users\Padmajamvl\arete\www\Default.aspx.vb:40
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

Please tell me what is the error. Its urgent.
Regards.
Jun 22 '07 #1
4 4996
Plater
7,872 Recognized Expert Expert
No connection could be made because the target machine actively refused it
This is the error given when the client can find the computer it wants to connect to but there is no one listening on that port.

Possible causes:
The port on the client does not match the port on the server
The server is set to listen on localhost and not IPANY
Misconfiguration of the service/client
Jun 22 '07 #2
Frinavale
9,735 Recognized Expert Moderator Expert
Plater has basically covered all the bases here but I'm just going to double check...
Have you provided the correct credentials to connect to that web service?

-Frinny
Jun 22 '07 #3
sd1978
5 New Member
I will tell you what i have done.

1. I have created the webservice in vs2005.

2. On the solution>right click> add webreference>url=www.arete.in>select webservice>rename webservice reference name="areteweb">click - add web refenrece.

3. Disco file, discomap file and wsdl file added to the solution.

4. the opened the following path: www.arete.in/default.aspx which is giving the error. You can also check this link and see the live error. if you select By Category OPtion enter Seafood, else if you select By Products option enter 1 in the textbox. this is nothing but a dummy that i have made and connected to my machine. the webservice is placed in the webserver. the database is northwind. once this webservice works fine I will only need to change the sql string.

Regards,
Jun 23 '07 #4
Plater
7,872 Recognized Expert Expert
I get a sql error (it times out trying to reach the sql server)
Jun 26 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

49
5644
by: sandeepdhankar10 | last post by:
hi experts, i have a .net user control. and i am using this in web page.. i want to make a plugin for my control so that it can be run in other Browsers as well.. like opera, mozilaa, netscape...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5594
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5022
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4688
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.