Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6087281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:51:10+00:00 2026-05-23T11:51:10+00:00

Using Microsoft’s EWS, we’re able to listen to a mailbox and take actions when

  • 0

Using Microsoft’s EWS, we’re able to listen to a mailbox and take actions when a new email comes in. However, I can’t figure out how to avoid the connection timing out.

Per Microsoft, here is the constructor for a StreamingSubscriptionConnection:

public StreamingSubscriptionConnection (
    ExchangeService service,
    int lifetime
)

In my app, I’ve coded it as follows:

service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
StreamingSubscriptionConnection conn = new StreamingSubscriptionConnection(service, 30);

In other words, I’ve got the timeout (lifetime) set to 30 minutes, because that’s the highest I’ve been able to set it. How can I increase this? Or, how can I trick this subscription into staying alive, even if ~45 minutes transpire between incoming emails?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:51:11+00:00Added an answer on May 23, 2026 at 11:51 am

    30 minutes is a hard limit. You can not change it to a higher value.

    To solve this issue, wire up a handler to the OnDisconnected handler of the OnDisconnect event of the connection instance. Restart the subscription from there (just call connection.Open() from that handler).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Microsoft Sql 2000 I have a requirement to be able to email a
Using Microsoft SQL Server's database mirroring capability, can the mirroring occur between two clusters?
Using Microsoft Visual Studio 2010: Can I write this type of macro in C?
Using Microsoft Spy++, I can see that the following windows that belong to a
Using Microsoft SQL Server 2005 - wondering how can I escape parenthesis in my
I am using Microsoft's membership framework on a website. I am able to send
I'm using Microsoft Ribbon for WPF and creating multiple RibbonTab. I cannot figure out
I'm using Microsoft.Web.Administration to create new websites on IIS 7.5 Using mgr As New
Recently working on Speech using microsoft translate. Just wonder if I can request by
I'm using Microsoft.Win32.OpenFileDialog in my WPF application for selecting file: var dlg = new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.