locked
EWS request failed .The underlying connection was closed: An unexpected error occurred on a receive. RRS feed

  • Question

  • Hi,

    We met an issue invoke the EWS on user's device suddenly, it worked well at last month.
    Could you help to give us some advice for us to investigate?

    The Exception as below:

    The request failed .The underlying connection was closed: An unexpected error occurred on a receive.

    Here list the relevant info about the client package.

    Framework Version: .NET Framework 4.0

    Microsoft.Exchange.WebServices Version: v2.0.50727

    Microsoft.Exchange.WebServices.Auth Version: v4.0.30319

    Source codes as below:

    ExchangeService service=new ExchangeService(ExchangeVersion.Exchange2013); service.UserDefaultCredentials=true; service.Url=https://XXXX/ews/exchange.asmx string email address = System.DirectoryServices.AccountManagerment.UserPrincipal.Current.EmailAddress; service.AutodiscoverUrl(emailaddress);

    FolderId folderid=new FolderId(WellKnownFolderName.Inox);

    List<SearchFilter> searchFilterCollection=new List<SearchFilter>();

    searchFilterCollection.Add(new SearchFilter,IsGreaterThan(ItemSchema.DateReceived,DateTime.Now.AddDays(-30)));

    searchFilterCollection.Add(new SearchFilter.IsEqualTo(ItemSchema.ItemClass,"IPM.Note"));

    SearchFilter searchFilter= new SerarchFileter.SerarchFilterCollection(LogicalOperator.And,searchFilterCollection.ToArrary());)

    var itemView=new ItemView(30,0,OffsetBasePoint.Beginning);

    FindItemsResults<Item> userItems=service.FindItems(folderId,serarchFilter,itemview);



    Friday, November 27, 2020 4:07 AM

Answers

  • Hi Tony Y Jia,
    This Visual C# forum mainly discusses and asks questions about the C# programming language, IDE, libraries, samples, and tools.
    Based on your description, it is recommended to ask the question on the Exchange Server Development forum and you can get more professional answer.
    Thank you for your understanding.
    Best Regards,
    Daniel Zhang


    "Visual c#" forum will be migrating to a new home on Microsoft Q&A ! We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A ! For more information, please refer to the sticky post.

    • Marked as answer by Tony Y Jia Monday, November 30, 2020 6:42 AM
    Monday, November 30, 2020 6:21 AM