none
ServiceRequestException: Only one usage of each socket address RRS feed

  • Question

  • Hi,

    I am using 2 instances of a windows service application (on different machines) to connect to Exchange 2010 SP1 through EWS Managed API 2.0. 

    Since a few days, one of the instances gets the following exception quite often while running:

     [Microsoft.Exchange.WebServices.Data.ServiceRequestException: The request failed. Unable to connect to the remote server ---> 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 10.0.0.1:443
    at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
    at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
    --- End of inner exception stack trace ---
    at System.Net.HttpWebRequest.GetResponse()
    at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.Microsoft.Exchange.WebServices.Data.IEwsHttpWebRequest.GetResponse()
    at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
    --- End of inner exception stack trace ---
    at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
    at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request)
    at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
    at Microsoft.Exchange.WebServices.Data.ExchangeService.FindItems[TItem](IEnumerable`1 parentFolderIds, SearchFilter searchFilter, String queryString, ViewBase view, Grouping groupBy, ServiceErrorHandling errorHandlingMode)
    at Microsoft.Exchange.WebServices.Data.Folder.InternalFindItems[TItem](SearchFilter searchFilter, ViewBase view, Grouping groupBy)
    at Microsoft.Exchange.WebServices.Data.Folder.FindItems(SearchFilter searchFilter, ItemView view)

    What does that mean? What can cause this issue? Why did that error come up immediatelly a few days ago?
    Any guess?

    Best Regards
    Andreas

    Tuesday, January 22, 2013 3:15 PM

All replies

  • No hints? Could it be a timing issue, saying that too much requests are made continously (altough the requests are done synchronously)? Would it help to do a Thread.Sleep() before/after the FindItems() call?

    Best Regards

    Andreas

    Monday, January 28, 2013 11:28 AM