System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted

I'm getting this error when hitting a webservice thousands of times for a mass upload. I've researched on the web and added the suggested code but am still getting the error:

protected override WebRequest GetWebRequest(Uri uri)
        {
            System.Net.HttpWebRequest webRequest = (System.Net.HttpWebRequest)base.GetWebRequest(uri);
            webRequest.KeepAlive = false;
            return webRequest;
        }
0
fattymc03
4/30/2009 3:01:52 PM
asp.net.xml-web-services 7071 articles. 0 followers. Follow

1 Replies
2602 Views

Similar Articles

[PageSpeed] 14

 Are you receiving it on the client, or on the service?


John Saunders | MVP – Connected System Developer
0
johnwsaunders3
5/3/2009 1:34:36 AM
Reply:

Similar Artilces:

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

Only one usage of each socket address (protocol/network address/port) is normally permitted
hello everybody,                         i am working on a project which uses socket programming.but when using the same socket for multiple number of times even after closing down the listener() at each time i use the socket.when i run the application it gives the error as the above.i am really worried about it.if somebody can helpme out.thanks in advance.ccreddy....

System.Net.Sockets.SocketException with MySQL Connector.NET
Hi. I already tried many things and spent already 2 days without any success. Please help or I'll hang myself.I am using MySql.Data.dll  ver. 5.2.5.0 (runtime v2.0.50727) from my project (library). It works great if i use it from WindowsApplication but once i use it same way in WebApplication, it keeps throwing: The attempted operation is not supported for the type of object referencedException Details: System.Net.Sockets.SocketException: The attempted operation is not supported for the type of object referenced .. AsyncResult ias = socket.BeginConnect(endPoint, null, null);.. (or w...

When runnig Web Service asynchronously
When I try to call web service asynchronousIy I am getting exception from CLR: System.Net.Sockets.SocketException: The attempted operation is not supported for the type of object referenced. (During VS.NET debugging the exception is wrapped as: Unable to connect to the remote server) When i call the service synchronously it works perfectly.  The service just convert strings to lower case. I'm using .NET Framework 2.0, here is the source code of form to call the service asynchronously:   Imports localhost Partial Class ChangeStrings Inherits System.Web.UI....

System.Net.Sockets.SocketException when trying to use xml feed
Hi folks, strange error I'm getting here, I'm trying to connect to the ECB s currency exchange feed which is located at http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml - it looks nice and simple to use.  However my code is throwing a socket exception when I run it from the server and a system.net.webexception - {"The remote server returned an error: (407) Proxy Authentication Required."} when I run it from within visual studio. I had a sample script which took feeds from the BBC site on my home computer which worked fine but it does not work from m...

System.Net.Sockets.SocketException
Hi, I am getting the following error. Does anyone know about this? It is working fine on some PC and giving error on others? Server Error in '/MyWebApps' Application. The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for 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: The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SocketException (0x2afc): The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for] System.Net.Dns.GetHostByAddress(IPAddress address) +186 System.Net.Dns.GetHostByAddress(String address) +54 MyWebApps.Global.Session_Start(Object sender, EventArgs e) +80 System.Web.SessionState.SessionStateModule.CompleteAcquireState() +525 System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)...

System.Net.Sockets.SocketException
Hi,   I am getting System.Net.Sockets.SocketException  exception on my server which is a console based application and i am using socket programming in it.i am getting this error only after 12.30am and  the server gets freezed, i am not able to trace the cause of the error as it occurs only at particular time and in particular condition, canm anyone please help me in finding the cause of this error and solution of it.Please Reply soon.   Thanks in advance Divya     These forums are for ASP.NET (web sites / web applications), not windows applica...

System.Net.Sockets.SocketException
I've been getting this very wierd exception on the secure checkout page of a shopping cart app recently. There is no code in the page that directly uses the system.net namespace, and the page has been pretty much error-free for a year. I guess it could be an indication that something might be wrong with IIS. Here's the stack trace: at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s...

System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
Hello, I got this error today in an Application.  This app is coded in asp.net 2, using VB.  I have the Andri Code (http://makoto.madmedia.ca/2007/03/mysql-membership-and-role-provider-for.html) to connect asp.net with mysql. It has never caused errors in the past, I have the same configuration on another app that has been running for several months with no problem. This app is new (1 week) and today is the first day I see this error. Any ideas? Server Error in '/' Application.-------------------------------------------------------------------------------- An estab...

Exception Details: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
The following class throws an excpetion that is handled by Utilities.LogError(Ex) which in turn gives me the error with regards to send mail. However I am trying to figure out why is ExecuteSelectCommand() throwing an exception to begin with. Any help is very appreciated. I have attached the stack trace to get a better insight. Also I am a noob when it comes to oop, asp.net etc. Apologise is this is too silly a question. Thanks  :)public static DataTable ExecuteSelectCommand(DbCommand command) { //The DataTable to be returnedDataTable table; //Execute the command making sure the...

System.Net.Sockets.SocketException #2
 I'd like to try to consume RSS feed and I get error: http://www.macedonium.org/Default2.aspx?jazik=2I'm using this code: http://blogs.msdn.com/coding4fun/archive/2006/10/31/912335.aspxIn my web.config I have: <system.net>    <defaultProxy>      <proxy bypassonlocal="true" usesystemdefault="false" />    </defaultProxy>  </system.net>and I still get the error... Hero of the day...

XMLDocument and System.Net.Sockets.SocketException
Hi All, I am trying to load XML file and I got the following error. It is working fine on test server but not on LIVE Web Server. 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 respondSource Error: Line 53: Line 54: XmlDocument xmlDoc = new XmlDocument(); Line 55: xmlDoc.Load(xmlData); Line 56: Line 57: XmlNodeList xmlNodeListRoot = xmlDoc.GetElementsByTagName("RootMenu&quo...

Exception Details: System.Net.WebException: The remote name could not be resolved: 'www.webservicex.net'
Hi , i gota error weni sued webservice the exception details is given as subject and here a giving the code i hav written i am beginner so pls help me out in this public partial class Weather : System.Web.UI.Page {string City; string Country;StockQuote stock = new StockQuote();  GlobalWeather oObj = new GlobalWeather();   string var;protected void Page_Load(object sender, EventArgs e) {       }protected void btnGo_Click(object sender, EventArgs e) {  var= stock.GetQuote("GVK");this.Response.Write("myQuote='" + var ...

System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
I have written a web service and tested it and it works fine from the .asmx test page. However, when I attempt to call it with a post I get this error:  The remote server returned an error: (500) Internal Server Error. 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.WebException: The remote server returned an error: (500) Internal Server Error.Source Error: Line 164: myStream.Close() Line 165: Line 166: Dim SomeResponse As WebResponse = XmlHttp.GetResponse() Line 167: Dim strm As Stream = SomeResponse.GetResponseStream() Line 168: Dim sr As StreamReader = New StreamReader(strm) Source File: c:\inetpub\wwwroot\SCNet\App_Code\SCClientSvc.vb    Line: 166 Why does the test work fine but give a 500 error when I just try and get the response? Hi This is a general error message.  Pls take a look at the event log on server to view detailed error message. Make sure the Url you specified in code is correct.NOTE:If you find my response contains a reference to a third party World Wide Web site, I am providing this information as a convenience to you.Microsoft does not control these sites and has not tested any software or information found on these sites; therefore,Microsoft cannot make any representations regarding the ...

System.NET.Mail cannot communicate to relay server through my .net server relay config
Environment: My PC – I’m testing the code from ServerA in debug mode using VS 2005 ServerA – my .Net Code server in which the code I’m testing resides and is running .NET version 2.0.50727 ServerB – An exchange server on our network   Problem & Info: I get this error no matter if I specify the exchange servername or my .net servername.  I want to use ServerB as the relay server in my System.NET.Mail but when I try that or try just using ServerA’s plain SMTP.  I've used the exchange server fine in other applications from other servers for my code so not sure why it'...

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

System.Net.Socket
Hi All, I'm trying to find some information on the Socket.Sockets class, or any other class that might be able to help. Background... I have a web service that is called from a client app. The web service has a class that opens an ip socket to another machine and performs the necessary functions. Once that interaction is complete the web service returns the result. I've setup the socket using an IPEndPoint object created using a IPAddress object. All works well except... The server I'm running this on has two NICs. I have one NIC that I want to use for incoming traffic ...

HTTP XML POST .NET
Hello,I am using the following code to HTTP post an xml file to third party server. Now I believe I am able to send the file correctly but I need to pass a HTML input field value of type hidden as well with it. If I use a simple HTML interface as shown below I am successful:<form enctype="multipart/form-data" action="https://myurl" method="POST">  <input type="hidden" name="MyFieldName" value="myvalue">  <input type="file" name="Myfile">  <br/>  <input type="submit"></form>I want to simulate the exact thing in my .NET code. I am confuse...

System.Net.Sockets.SocketException+webservice+Sourabh Das
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 itSource Error: Line 91:    ...

System.Net.Sockets.SocketException when using the HttpWebRequest.GetResponse
Hello i keep gettign this error when i use this code Error: An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in system.dll Additional information: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full Code: Dim HTTP_request As HttpWebRequest Dim HTTP_response As HttpWebResponse HTTP_request = HttpWebRequest.Create("http://www.google.com/images/logo.gif") HTTP_response = HTTP_request.GetResponse the erorr happens every time on the "HTTP_response = HTTP_...

System.Net.WebException and server committed a protocol violation
Hi there, Does anyone knows what causes the System.Net.WebException and server committed a protocol violation and how do I debug it?  Sometimes when I send the url request string to the web brower by using  the HttpWebRequest and HttpWebResponse and it doesn't have any System.Net.WebException or server committed a protocol violation, but after a couple request sending, I get that error at the HttpWebResponse , at first I thought because there are too many  request sending at once, that's why it causes the System.Net.WebException and the server comm...

System.Net.Mail.SmtpClient sends address within apostrophes(single quotes) and the server doesn't recognize server
Hello. I have a page that uses SmtpClient to send a message. the application works perfectly without bugs, but the server returns the following error message: Hi. This is the qmail-send program at smtp2.mailcluster.com.br.I'm afraid I wasn't able to deliver your message to the following addresses.This is a permanent error; I've given up. Sorry it didn't work out.<'******@igf.com.br'>:Sorry, I couldn't find any host named igf.com.br'.  It appears that the "magic" apostrophes that microsoft solved to put around the address messes up everything. The smtp server of this ap...

System.Net.WebException: The remote server returned an error: (500)
I am getting a an error The remote server returned an error: (500) Internal Server Error. 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.WebException: The remote server returned an error: (500) Internal Server Error. Source Error: Line 45: response.write ("Hello I am here First") Line 46: wRequest.Headers.Add("Man", "GET " & URL)...

.NET Remoting VS Socket Programming VS Web Services
Hi, Could any one tell me the difference between these three programming features and where they are used? Thank you, Rajadurai ..NET Remoting is built on Socket programming and XML Web services are built on top of Remoting. All of them provide the Server-Client functionality. You use Socket programming when Client is waiting for notifications/events from server. Remoting  is a higher layer on Sockets. When both client and server is under your control you can use Remoting. Web Services are total freedom. Client and server can be implemented in different technologies. ...

Difference from System.Web and System.Net
Excuse me, could anyone explain me a concept of the differnce between System.Web and System.Net? And how to use two of these? Thank you, Aom I believe you are on the wrong mailing list! On 2014-06-26, 5:49 AM, Alonze wrote: > Excuse me, could anyone explain me a concept of the differnce between System.Web and System.Net? > And how to use two of these? > > > Thank you, > > Aom > > > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-...

Web resources about - System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted - asp.net.xml-web-services

Resources last updated: 3/4/2016 11:02:01 AM