Link to home
Start Free TrialLog in
Avatar of Zenith63
Zenith63

asked on

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

Avatar of Alan Hardisty
Alan Hardisty
Flag of United Kingdom of Great Britain and Northern Ireland image

Avatar of Zenith63
Zenith63

ASKER

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
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
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.
ASKER CERTIFIED SOLUTION
Avatar of Alan Hardisty
Alan Hardisty
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Thanks for the help!