• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1048
  • Last Modified:

Exchange 2003 ActiveSync command GetAttachment gives HTTP500 error

Hi guys,

I have a very strange one here that I could do with some help on!  A customer has two Exchange 2003 SP2 servers, not in a front-end/back-end setup (yeah, I know :)).  It's not clear if this has always been happening or if it is a new issue, but when a user clicks an attachment in an email on their Apple iOS device it tries for a moment then says it cannot download the attachment.  If they click "Download full message" and then click the attachment it will generally open no problem.  Initially this seemed like an iOS issue but I have now setup some Android devices for them and no attachments will download (there is no "download full mail" option in the Android mail client).

On further research we've found the Exchange server is giving a HTTP500 response to the ActiveSync GetAttachment command.  At first I blamed the AntiVirus (GroupShield) so we built another Exchange 2003 server in the Organisation without AV installed and moved some mailboxes to it, the exact same problem is present.

I think I've checked virtually all possible KB articles but I'm hoping I've missed something.  All other functions of ActiveSync are working except GetAttachment.

I'm not 100% certain but I understand that iOS might use a different mechanism when you do the "Download full message", maybe a SYNC followed by a ITEMOPERATIONS command to grab the attachment.  This may be why one method works and the other does not.


Any ideas?

Below is an excerpt from the ActiveSync session -
2014-01-20 18:53:46,771 INFO [HttpRequest.debugLog:305] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) REQ ToSrv POST /Microsoft-Server-ActiveSync Cmd=GetAttachment&AttachmentName=Inbox/Test%2018:31.EML/1_multipart_xF8FF_2_image001.png&User=joe.bloggs%40internal.local&DeviceId=SEC1082ABFAF1655&DeviceType=SAMSUNGGTI9195 HTTP/1.1 Content:n/a,0,0
2014-01-20 18:53:46,771 DEBUG [AbstractHttpMessage.debugLog2:759] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: Authorization: Basic joe.bloggs@internal.local:*****
2014-01-20 18:53:46,771 DEBUG [AbstractHttpMessage.debugLog2:755] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: MS-ASProtocolVersion: 2.5
2014-01-20 18:53:46,772 DEBUG [AbstractHttpMessage.debugLog2:755] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: Connection: keep-alive
2014-01-20 18:53:46,772 DEBUG [AbstractHttpMessage.debugLog2:755] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: User-Agent: SAMSUNG-GT-I9195/101.40202
2014-01-20 18:53:46,772 DEBUG [AbstractHttpMessage.debugLog2:755] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: X-MS-PolicyKey: 0
2014-01-20 18:53:46,772 DEBUG [AbstractHttpMessage.debugLog2:755] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: Accept-Encoding: gzip
2014-01-20 18:53:46,772 DEBUG [AbstractHttpMessage.debugLog2:755] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: Content-Length: 0
2014-01-20 18:53:46,772 DEBUG [AbstractHttpMessage.debugLog2:755] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: Host: exch2k3.internal.local
2014-01-20 18:53:46,772 DEBUG [SocketThread.getServerSocket:1918] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Connecting to: exch2k3.internal.local:443

2014-01-20 18:53:56,346 INFO [HttpResponse.debugLog:173] (Thread-46) (TAG,DOWN,1.2.3.4:16137,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,54237:exch2k3.internal.local) RSP FromSrv HTTP/1.1 500 Internal Server Error Content:text/html,56,0

Open in new window

0
Zenith63
Asked:
Zenith63
  • 4
  • 3
1 Solution
 
Alan HardistyCo-OwnerCommented:
0
 
Zenith63Author Commented:
Thanks for the reply Alan,

Yes I'd actually come across your article a couple of times before re-activating my EE account so I could post this question.  I've been through your article and the only two things I can see that I have not tried is to try ActiveSync over HTTP rather than HTTP and to run isinteg, however I don't think either of these will solve the issue as in general ActiveSync seems to be fine over HTTPS, it's one very specific ActiveSync command I'm having issues with, and on the isinteg test we have moved users to different databases, storage groups and Exchange servers.  It really is a very strange issue, any other ideas?

Regards,
Philip
0
 
Alan HardistyCo-OwnerCommented:
No problems.  How exactly are the servers configured?

Is it one server with the problem or both servers?

What versions are the massync.dll's on both servers?

What firewall / router do you have installed?

Alan
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Zenith63Author Commented:
Hi Alan,

I think I might have just discovered the issue so I might put this on-hold if you don't mind.  There is a MobileIron Sentry reverse-proxy in front of the Exchange servers and it seems the version they are on may not be encoding the GetAttachment POST command properly if the attachment name has a space or special character in it.  We hadn't come across the issue before because GetAttachment is dropped in Exchange 2010+ so the filename mangling hasn't been an issue for other customers!

To answer your question though; 3 Exchange servers, none set as front-ends.  Not sure on the firewall/router I'm afraid.
0
 
Alan HardistyCo-OwnerCommented:
Okay - thanks for the info.  Sounds like you might be on to something so see where that takes you and shout if that's a dead-end.

Alan
0
 
Zenith63Author Commented:
OK this turned out to be a bug in Sentry version 4.7.1, it doesn't handle spaces or special characters in attachment names properly when calling the GetAttachment function so Exchange naturally cannot retrieve the garbled file it asks for. Fixed in Sentry 4.9.0.

Thanks again Alan.
0
 
Zenith63Author Commented:
Thanks for the help!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now