Fix for MSExchange Availability Event ID 4002 Errors

Wednesday, December 7, 2011
You may find in an Exchange 2007 to Exchange 2010 coexistance enviroment that the following event is logged with some regularity:
Log Name:      Application
Source:        MSExchange Availability
Date:          12/7/2011 12:49:41 PM
Event ID:      4002
Task Category: Availability Service
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      exch2.domain.com
Description:
Process 2540: ProxyWebRequest IntraSite from S-1-1-0 to
https://email.domain.com/ews/exchange.asmx failed. Caller SIDs: NetworkCredentials. The exception returned is Microsoft.Exchange.InfoWorker.Common.Availability.ProxyWebRequestProcessingException: System.Web.Services.Protocols.SoapException: Microsoft.Exchange.InfoWorker.Common.Availability.TimeIntervalTooBigException: The requested time duration specified for FreeBusyViewOptions.TimeWindow is too long. The allowed limit = 42 days; the actual limit = 62 days. ---> The requested time duration specified for FreeBusyViewOptions.TimeWindow is too long. The allowed limit = 42 days; the actual limit = 62 days.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
   at Microsoft.Exchange.InfoWorker.Common.Availability.Proxy.Service.EndGetUserAvailability(IAsyncResult asyncResult)
   at Microsoft.Exchange.InfoWorker.Common.Availability.FreeBusyApplication.EndProxyWebRequest(ProxyWebRequest proxyWebRequest, QueryList queryList, Service service, IAsyncResult asyncResult)
   at Microsoft.Exchange.InfoWorker.Common.Availability.ProxyWebRequest.EndInvoke(IAsyncResult asyncResult)
   at Microsoft.Exchange.InfoWorker.Common.Availability.AsyncWebRequest.EndInvokeWithErrorHandling(). The request information is ProxyWebRequest type = IntraSite, url =
https://email.domain.com/ews/exchange.asmx
Mailbox list = <Robert Donaldson>SMTP:RDonaldson@domain.com, Parameters: windowStart = 12/1/2011 12:00:00 AM, windowEnd = 2/1/2012 12:00:00 AM, MergedFBInterval = 30, RequestedView = FreeBusy
. ---> System.Web.Services.Protocols.SoapException: Microsoft.Exchange.InfoWorker.Common.Availability.TimeIntervalTooBigException: The requested time duration specified for FreeBusyViewOptions.TimeWindow is too long. The allowed limit = 42 days; the actual limit = 62 days. ---> The requested time duration specified for FreeBusyViewOptions.TimeWindow is too long. The allowed limit = 42 days; the actual limit = 62 days.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
   at Microsoft.Exchange.InfoWorker.Common.Availability.Proxy.Service.EndGetUserAvailability(IAsyncResult asyncResult)
   at Microsoft.Exchange.InfoWorker.Common.Availability.FreeBusyApplication.EndProxyWebRequest(ProxyWebRequest proxyWebRequest, QueryList queryList, Service service, IAsyncResult asyncResult)
   at Microsoft.Exchange.InfoWorker.Common.Availability.ProxyWebRequest.EndInvoke(IAsyncResult asyncResult)
   at Microsoft.Exchange.InfoWorker.Common.Availability.AsyncWebRequest.EndInvokeWithErrorHandling()
   --- End of inner exception stack trace ---
. Name of the server where exception originated: EXCH2. Make sure that the Active Directory site/forest that contain the user's mailbox has at least one local Exchange 2010 server running the Availability service. Turn up logging for the Availability service and test basic network connectivity.

This happens because the default values used for publishing free\busy are different between Exchange 2007 and Exchange 2010.  The fix is to extend the free\busy value on the Exchange 2007 client access servers in IIS.
  • Log into the Exchange 2007 Client Access Server (CAS)
  • Open Internet Information Services (IIS) Manager in Adminstrative Tools
  • Navigate to Sites > Default Web Site > EWS
  • Double-click Application Settings under the ASP.NET heading
  • Click Add in the Actions pane and create the following new application setting:
    • Name: maximumQueryIntervalDays
    • Value: 62
  • Click OK to set the new value and close IIS Manager
  • Repeat for each Exchange 2007 CAS

There's no need to restart IIS on the Exchange 2007 CAS.  The event 4002 errors will go away.


8 comments:

  1. Hi Jeff,
    The solution that you have is basically a work around not a solution. Error will still appear but after sometime - is that correct?
    Because above solution is extending the time period of free/busy.
    Regards,
    Exchange User
    j4209211@hotmail.com

    ReplyDelete
  2. This solution did not work for me. The error remains!
    Exchange User
    J4209211@hotmail.com

    ReplyDelete
  3. Adjusting the Exchange 2007 value for maximumQueryIntervalDays to match the new (higher) values in Exchange 2010 is not a work around, it's a configuration change required during coexistance. It has worked for every client I've seen that has this problem. I'm sorry it's not working for you. Perhaps you're missing something?

    ReplyDelete
  4. In my case I think it's not working because I'm running Ex2010. Also, compared error message with the one in your post it bit different after:
    "Mailbox list = SMTP:RDonaldson@domain.com, Parameters: windowStart = 12/1/2011 12:00:00 AM, windowEnd = 2/1/2012 12:00:00 AM, MergedFBInterval = 30, RequestedView = FreeBusy
    . ---> System.Web.Services.Protocols.SoapException: "

    This what I have after the line above:

    "---> System.Net.WebException: The request failed with an empty response.
    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
    at Microsoft.Exchange.InfoWorker.Common.Availability.Proxy.Service.EndGetUserAvailability(IAsyncResult asyncResult)
    at Microsoft.Exchange.InfoWorker.Common.Availability.FreeBusyApplication.EndProxyWebRequest(ProxyWebRequest proxyWebRequest, QueryList queryList, Service service, IAsyncResult asyncResult)
    at Microsoft.Exchange.InfoWorker.Common.Availability.ProxyWebRequest.EndInvoke(IAsyncResult asyncResult)
    at Microsoft.Exchange.InfoWorker.Common.Availability.AsyncWebRequest.EndInvokeWithErrorHandling()
    --- End of inner exception stack trace ---
    . Name of the server where exception originated: HHTMAIL. Make sure that the Active Directory site/forest that contain the user's mailbox has at least one local Exchange 2010 server running the Availability service. Turn up logging for the Availability service and test basic network connectivity."

    This configuration change is it only for Ex2007 to coexists with Ex2010 OR it can be used for Ex2003 and Ex2010 coexistance?

    ReplyDelete
  5. I have only run into this with Exchange 2007 / 2010 coexistance. I have nt tested it with 2003.

    ReplyDelete
    Replies
    1. I have Ex2010 servers: 1xMBX, 1xCAS/HT and 1xET. The error is on MBX server which doesn't have any web services installed. Therefore, I added the configuration you have in your post on CAS/HT. So far no luck. But one interesting thing I have found that it's only happening with one account. If that account uses outlook2010 over citrix error occured and when uses Outlook 2003 over citrix doesn't come up.
      This is a test account and initially created on Ex2010 server. There are several accounts that have been migrated from Ex2003 to Ex2010 they are not having this error.
      What do you think?

      Delete
  6. If its a Windows 2003 x64 server, you can add the change as follows:
    1. Open IIS console
    2. Expand Default Web Site
    3. Click on EWS, select Properties
    4. Click on ASP.NET tab
    5. Click on Edit Configuration
    6. On General tab, enter the application setting for maximumQueryIntervalDays.
    7. Click OK twice.

    ReplyDelete

Thank you for your comment! It is my hope that you find the information here useful. Let others know if this post helped you out, or if you have a comment or further information.