A connection attempt failed

I have published a web service but when ever I run a page that tries to connect to the service on my local machine I recieve the following error.

 

Server Error in '/TestCreate' Application.

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 152.1.166.214:8800

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: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 152.1.166.214:8800

Source Error:

Line 124:        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://cuacs8.mck.ncsu.edu/TestWebService/GetELAFlag", RequestNamespace="https://cuacs8.mck.ncsu.edu/TestWebService/", ResponseNamespace="https://cuacs8.mck.ncsu.edu/TestWebService/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
Line 125:        public int GetELAFlag(int Curriculum) {
Line 126:            object[] results = this.Invoke("GetELAFlag", new object[] {
Line 127:                        Curriculum});
Line 128:            return ((int)(results[0]));

Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\testcreate\e3ca58e8\775a4f68\App_WebReferences.nb5rjgdv.0.cs    Line: 126

Stack Trace:

[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 152.1.166.214:8800]
   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() +5322142
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +103
   WebReference.TestCreationService.GetELAFlag(Int32 Curriculum) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\testcreate\e3ca58e8\775a4f68\App_WebReferences.nb5rjgdv.0.cs:126
   ContractService.GetELAFlag(Int32 Curriculum) in c:\inetpub\wwwroot\TestCreate\App_Code\ContractService.vb:10
   ManageContract.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\TestCreate\Manager\ManageContract.aspx.vb:22
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

 

What is wrong here.  Is ther an error in IIS.  Also of note when I first tried to add a reference it did not include the wsdl  I had to add ?wsld to the address.  NOt sure if this is the issue.

0
Luckbox72
5/1/2009 8:25:47 PM
asp.net.xml-web-services 7071 articles. 0 followers. Follow

8 Replies
1830 Views

Similar Articles

[PageSpeed] 56

Can you please try with some other port number instead of 8800? I believe 8800 has been used by some other application thats why you are getting the error.


Please mark it as answer if it resolves the issue.

visit: http://technicalsol.blogspot.com
0
sumitd
5/2/2009 4:59:17 AM

Ok this might be a stupid question, but how do you change the port.  When I navagate to the webservice at http://152.1.166.214/itemdev/testcreationservice/testcreationservice.asmx I can see the service with no isues.  I have added the webreference and when I run the website that consumes the web service is when it uses port 8800. why does it use that port?

0
Luckbox72
5/4/2009 12:40:30 PM

I forgot to mention that the server has a Tomcat load balancer on it, would this be causing the issue?

0
Luckbox72
5/4/2009 1:01:59 PM

Add webreference using below url, without port number

http://152.1.166.214/itemdev/testcreationservice/testcreationservice.asmx 


Please mark it as answer if it resolves the issue.

visit: http://technicalsol.blogspot.com
0
sumitd
5/4/2009 3:05:35 PM

I did not include the port number when I added the webreference.  I am unsure how  the port number was added.

Also when I publish te wenservice localy I have no issues adding the reference, but when I copy the published site to the server it is not able to find the wsdl,  Is there a step I am missing when I am copying the site to the server?

 

0
Luckbox72
5/4/2009 3:59:56 PM

When we add Web Reference from local client Application, the port number of the proxy server (for ex 8800) get attached to the actaul URL in the client proxy class instead of Listener port number of the actual proxy server.This is the reason why port number 8800 is appended to the IP  and not allowing to call the remote WebService.  

Try this:

While adding Web Reference for the service, instead of specifying direct URL, specify URL?wsdl and then add the Web Reference. 

Type http://152.1.166.214/itemdev/testcreationservice/testcreationservice.asmx?wsdl in the URL field instead of http://152.1.166.214/itemdev/testcreationservice/testcreationservice.asmx 

After adding the Web Reference, modify the web.config to change the URL to remove the port number at the end. 

Modify the appSettings entry of the Web.Config 

<add key="YourWebServiceName.testcreationservice" value="http://152.1.166.214:8800/itemdev/testcreationservice/testcreationservice.asmx "/> 

to 

<add key="YourWebServiceName.testcreationservice"
value
="http://152.1.166.214/itemdev/testcreationservice/testcreationservice.asmx "/>


Please mark it as answer if it resolves the issue.

visit: http://technicalsol.blogspot.com
0
sumitd
5/4/2009 5:29:45 PM

Thanks, I ahd just found that line in the web.config.  Works now.  Thanks again

0
Luckbox72
5/4/2009 6:23:46 PM

Hi,

It's gr888 to know your problem has been resolved. Please mark the post as answer which helped you in resolving the issue, so that others can refer for similar kind of issue.


Please mark it as answer if it resolves the issue.

visit: http://technicalsol.blogspot.com
0
sumitd
5/5/2009 2:57:21 AM
Reply:

Similar Artilces:

VS2005 IDE: Add Web Refernece. A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has fa
 I have published a web service, but cannot connect to it in VS2005.  The Web Methods display, but I then get this error:A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond I CAN connect to it outside of VS2005 from IE, Stylus Studio, etc.  /Bob C in GRR Hi  Bob, That might be a problem with proxy. Please try this solution: http://west-wind.com/weblog/posts/3871.aspx. Also you can refer to this article: http://msdn.microsoft...

xml web service --uploading the file to the xml web service
how can we upload the file in the xml web service 1.i mean what will be the return value in the proxy class 2.and how am i going to send the file to the xml web service----regards Bipul Kumar Here are some links to articles that helped us get this done: http://msdn.microsoft.com/webservices http://www.microsoft.com/downloads/details.aspx?familyid=06255a94-2635-4d29-a90c-28b282993a41&displaylang=en https://www.sys-con.com/dotnet/article.cfm?id=458 Hope this helps....

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
I am having issues while sending mails using the namespace System.Net.Mail.I keep getting the error as below:A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respondThe code works in other remote hosting servers. This error occurs only for this particular server infotechage.com. I found some articles which said increase the timeout, but that does not help me. What may be the reason for this? Please help. I have been working on this issue for the last 3 days but in v...

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Hi All,  I have created a FTP client in ASP.net and it's working fine on my local system but when i deployed this code on Public IP(Remote server) it's not working.Code and Exceptions message are give below. public void Login() { if ( this.loggedin ) this.Close(); Debug.WriteLine("Opening connection to " + this.server, "FtpClient" ); IPAddress addr = null; IPEndPoint ep = null; try { this.clientSocket = new Socket( AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp ); addr = Dns.Resolve(this.serve...

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
I am running a e-commerce website which will call a remote payment gateway when customer check out. with ASP.NET(2.0) The Bank Give Me WebService and say to me to use post method for sending my information. My Transaction State Is Ok But when i call a method of Bank webservice  it give me error   _______My Sample Code ___________ double TA;WebServices.ReferencePayment PaymentWebService = new WebServices.ReferencePayment();string MID = "00229018-45987";string t_strRefNum="*********";double t_lAmount;protected void Page_Load(object sender, EventArgs e) &n...

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Background: I am running a e-commerce website which will call a remote payment gateway when customer check out. I have tested my web application at my local machine. Everything just works fine. I have no problem to connect my payment gateway  However, after I have upload all my application code to my hosting company, I cannot check out because my web application cannot connect to the payment gateway And get following errors: " A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected...

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
please can you help, when i do my request form i am getting an error. this happens when it is called over the web externally when i launch in visual stuido it works fine, i am local to the smtp server. it is an Exchange 2003 server. It has an address published, i can connect to port 25 with telnet to the dnsname.   I have many different snippets of code i have tried in a bid to get to the root, i think it cant authenticate. i have assigned 3 buttons to different subs for the mail send, noe of which work   A connection attempt failed because the connected party did not properly...

DynamicPopulateExtender: Web Service call failed: 12152, Web Service call failed: 12031
Hi, I'm using a DynamicPopulateExtender to take the value of a SELECT dropdown and pass it to an onpage web service (defined with <System.Web.Services.WebMethod()> _ '<System.Web.Script.Services.ScriptMethod()>) and as PUBLIC SHARED FUNCTION myfunction(contextKey as string) as string. The function returns the html for a listbox. Everything seems to fire properly on the client but when the web service is called by the Javascript function, I get Web Service call failed: 12152 or Web Service call failed: 12031 Any pointers would be appreciated.  Do...

"A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond IP:PORT"
 Hi all, "A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond IP:Port"  this is the error i am geeting while sending an email using System.Net.Mail My Code here :MailMessage objMail;        SmtpClient objSMTP;        // Now create the email        objMail = new MailMessage();        objMail.To.Add...

Web service in .NET from Java Web Service
Hi there,I'm pretty new to .net (although i have years of experience with the old vb 6, access 2k, as well as java)... and need some with perhaps either some syntax or something.Here is the wsdl.<wsdl:definitions targetNamespace="http://www.dynix.com/schema/book">−<wsdl:types>−<schema targetNamespace="GetBookInfoByISBN">−<complexType name="BookInfoType">−<sequence><element maxOccurs="1" minOccurs="0" name="Title" nillable="true" type="xsd:string"/><element maxOccurs=&quo...

.NET web services Vs Java Web Services
Hello, does anyone know of a book or good source of information that compares .NET and Java Web Services? (I would like soemthing neutral if possible). I am thinking of approaching this subject for my dissertation? Many Thanks Rob Hi Rob, Last year I had to give a powepoint presentation on Web Services. I noticed some good books at barnes and noble that discussed the subject. These books were specific to Java and discussed Web Services in a very clear fashion. They gave some elementary examples that were easy to understand. I have not yet had the pleasure of creatin .NET Web Servi...

Exception while calling .NET web service | System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
Hi,   We have written a .NET web service which retrieves an xml file from the database. This web service is SSL secured and requires client certificates for connection.   Problem: The web service is throwing an exception while retrieving large files. It works fine when the file size is around 1 MB, but fails with a file size of around 65 MB with the following exception: System.InvalidOperationException: There is an error in XML document (1, 38455668). ---> System.IO.IOException: Unable to read data from the transport connection. ---> System.Net.Sockets.SocketException: ...

Can you return .net web controls in a .net page from a web service?
I've got a problem with a project. I've got to compile an entire .net page and return it as part of a Web Service for display. The problem I have is that I need to add WebControls and functionality to the page so that not only the html content and images are displayed (which I've managed) but that textboxes, labels, buttons and datasets can be displayed also. Essentially I need to make a call from one site for a page, populate the page and return it in a state as though it resided on the same server/webspace as the calling page. Code is currently built as follows into a string: strOpenHT...

Changing db connection in xml web services
Hi there, I am new to .NET and currently need some help in developing a web service. The connection string inside the web service is fixed but leave the database server name blank. When the client call the web methods from the web service, I need to pass the database server name into the web service. I had tried to use constructor (sub new) and class property inside the web service class but failed. And I cannot store the connection string inside the web.config file. Is there any way to pass in a global yet dynamic value/property into the XML web service? The following is the example f...

Web resources about - A connection attempt failed - asp.net.xml-web-services

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
High-quality data, if not used properly, can still lead marketers to make bad decisions. Consider these common ways that numbers are used to ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

CareerSonar Turns Facebook Friends Into Job Connections
Looking for a job ? Among your Facebook friends lies the potential for employment. CareerSonar , a new service, brings together a person’s connections ...

Ben Garcia gives Penrith Panthers a new French connection
Should he jag a game in the NRL, Ben Garcia will become just the third genuine French import to do so.

Man Charged With Aggravated Arson In Connection To Columbus Warehouse Fire
Police have charged 30-year-old Robin Toms with aggravated arson.

Fictional Lawyers Use Their Family Connections Too
This film character had a family connection to his lawyer.

This Is How Facebook Is Working to Improve Experience On Slower Connections
... the globe, that’s not their situation . In recent years, Facebook has paid close attention to its user experience on 2G and other slow connections. ...

Addappt now lets you block contacts and connections
... gives you even more control than before. New features Block a current contact from connecting if they use Addappt down the road Block a connection ...

Facebook becomes more adept at dealing with crappy connections
... to get a decent phone signal to allow you to post a photo of your meal. Joking aside, in countries where people are struggling with 2G connections ...

Resources last updated: 12/15/2015 10:18:33 AM