none
iPhone sending attachment problems

    Question

  • Hi,

    I'm testing an Exchange 2010 setup. All is setup well, everything works flawless, except for one thing. ActiveSync in combination with iPhone OS 3.1.2. And the only problem that one has is sending attachments. The rest is all working perfect.

    Problem:
    Send an attachment (photo for example), and initially there's always an error popping up, "Sending this message failed". Go to outbox, hit refresh, and it sends. (9 out of 10 times). ActiveSync logging doesn't reveal anything. Have no other phones to test with. Both iPhones I tested with are having the same issue. I can remember having had the same problem with Exchange 2007 in an early roll up, with the difference that it wouldn't send at all back then. Whether it was the phones firmware, or roll up packages, I can't remember. All I know E2K7 SP1 and SP2 worked flawlessly. Now with E2K10 I'm having troubles again.

    I already removed Sent items from Favorites, because I read somewhere that Exchange tries to keep the folders which are in Favorites in sync over ActiveSync. Imagined this could be a problem, but it turned out it didn't help.

    All Exchange connectivity tests succeed, certificates are ok and working.

    So far I ran out of options, I hope someone here has the same issues or better, has solved it :)
    Sunday, February 14, 2010 1:39 PM

Answers

  • Hi,

    I don't know if UltraSub have the problem anymore but i will post my solution for any other searching hours like me.

    This one worked for me.

    When you use certificate authentication you have to set the uploadReadAheadSize in the IIS metabase to your max email size, the default is 48KB so nearly any attachment cannot be sent/forwarded.

    With the following command you can change the value (in this case 10MB):
    C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.webServer/serverRuntime /uploadReadAheadSize:"10485760" /commit:apphost

    C:\Windows\System32\inetsrv\appcmd.exe set config "Default Web Site" -section:system.webServer/serverRuntime /uploadReadAheadSize:"10485760" /commit:apphost

    After this restart the IISAdmin service to affect the change.

    The folling articel helped me:
    http://www.expta.com/2010/02/how-to-securely-deploy-iphones-with_25.htm

    The only things i want to know now.
    - Why does this only occur on Iphone and not on WinMo
    - Why doesn't this occur without certificate authentication. 
    - Why does mailsend work after some retries. 

       

    • Marked as answer by UltraSub Thursday, January 06, 2011 11:35 AM
    Thursday, November 18, 2010 1:34 PM

All replies

  • Hey did you ever resolve, I was thinking hot fix at least has a newer active sync DLL? Have to call to get it. http://support.microsoft.com/kb/967046
    Friday, June 04, 2010 5:17 AM
  • Is there any error code on the iPhone? ActiveASync usually produces some error code when it encounters the problem.

    Poomba1, the link you posted - http://support.microsoft.com/kb/967046 - applies to Exchange 2003 so it's not relevant here.


    MCITP: Enterprise Messaging Administrator
    Friday, June 04, 2010 5:47 AM
  • Hey did you ever resolve, I was thinking hot fix at least has a newer active sync DLL? Have to call to get it. http://support.microsoft.com/kb/967046
    It's a fix for 2003 :(

    Is there any error code on the iPhone? ActiveASync usually produces some error code when it encounters the problem.

    Poomba1, the link you posted - http://support.microsoft.com/kb/967046 - applies to Exchange 2003 so it's not relevant here.


    MCITP: Enterprise Messaging Administrator
    No, can't find an error. Just the popup I already told in the OP.. Looking at active sync logging, it all seems normal there. My guess it has something to do with the inline sending of pictures of the iPhone device. If they send correctly after some trying, active sync logging on server looks fine, the other failed tries aren't even mentioned. If I kill the mail process on the iPhone, and restart it, mail sends right away. So it all looks like the iPhone is the culprit here. However... It worked with Exchange 2007. So something has changed with 2010. Upgrading the device to 3.1.3 didn't help. Hope OS4 will fix this. /edit Just tested my iPad. It's OS 3.2. Exact same problem.
    Friday, June 04, 2010 6:12 AM
  • Probably it makes sense to set logging level to Verbose and see if it gives a better picture?

    MCITP: Enterprise Messaging Administrator
    Friday, June 04, 2010 6:24 AM
  •  Right, I know, but the roll up fix for 2007 documented that fix and I have 2003 with same issue, so it has been broken, fixed and apparently in 2010 broken again. I was hoping maybe a manual work around may do it. I am going to upgrade from using the default .Net process to a dedicated process and to newer.net build (2.0.50727).
     No error message, just as posted, mail client just dies and only if it is over 60kb or so. Something fishy in all this.

     I can also confirm, it is broken in the iPad for us as well.

     

    Friday, June 04, 2010 6:26 AM
  • ** Bump **

    No solution yet?

    Upgraded to Exchange 2010 SP1, running iOS 4.0.1 now, still not fixed.
    Very very annoying. Starting to think of switching to another mailplatform. I can find the same problem everywhere, but no one has a solution.

     

    /edit
    Tried to reproduce today to post logs. Guess what, can't reproduce :)
    Annoying.. But problem is still there. Especially over cellular network, where speeds are way slower. Wifi is harder to reproduce. So yeah, maybe it has something to do with slow transfer speeds, but fact is, just like Poomba1 says, it was fixed before. Slow speeds were not an issue before.

    Friday, September 10, 2010 8:16 AM
  • Hi,

    I don't know if UltraSub have the problem anymore but i will post my solution for any other searching hours like me.

    This one worked for me.

    When you use certificate authentication you have to set the uploadReadAheadSize in the IIS metabase to your max email size, the default is 48KB so nearly any attachment cannot be sent/forwarded.

    With the following command you can change the value (in this case 10MB):
    C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.webServer/serverRuntime /uploadReadAheadSize:"10485760" /commit:apphost

    C:\Windows\System32\inetsrv\appcmd.exe set config "Default Web Site" -section:system.webServer/serverRuntime /uploadReadAheadSize:"10485760" /commit:apphost

    After this restart the IISAdmin service to affect the change.

    The folling articel helped me:
    http://www.expta.com/2010/02/how-to-securely-deploy-iphones-with_25.htm

    The only things i want to know now.
    - Why does this only occur on Iphone and not on WinMo
    - Why doesn't this occur without certificate authentication. 
    - Why does mailsend work after some retries. 

       

    • Marked as answer by UltraSub Thursday, January 06, 2011 11:35 AM
    Thursday, November 18, 2010 1:34 PM
  •  There may be merit to this uploadreadahead value, I am gong to give it a whirl.

     

    Saturday, November 20, 2010 7:05 AM
  • Hi,

    I don't know if UltraSub have the problem anymore but i will post my solution for any other searching hours like me.

    This one worked for me.

    When you use certificate authentication you have to set the uploadReadAheadSize in the IIS metabase to your max email size, the default is 48KB so nearly any attachment cannot be sent/forwarded.

    With the following command you can change the value (in this case 10MB):
    C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.webServer/serverRuntime /uploadReadAheadSize:"10485760" /commit:apphost

    C:\Windows\System32\inetsrv\appcmd.exe set config "Default Web Site" -section:system.webServer/serverRuntime /uploadReadAheadSize:"10485760" /commit:apphost

    After this restart the IISAdmin service to affect the change.

    The folling articel helped me:
    http://www.expta.com/2010/02/how-to-securely-deploy-iphones-with_25.htm

    The only things i want to know now.
    - Why does this only occur on Iphone and not on WinMo
    - Why doesn't this occur without certificate authentication. 
    - Why does mailsend work after some retries. 

       

    Yes! You're a lifesaver.
    Just tested this, and it sure looks like this is the solution. Already send 3 emails with a size of 5MB without a glitch over a 3G connection.
    Running an iPhone 4 on 4.1 (8B117). Will test my girlfriend's 3GS tonight. Hope this one sticks :)

    Thanks again!

    Thursday, January 06, 2011 11:34 AM
  • Awesome, that worked perfectly for me! Exchange 2010, seperate CAS, IOS7 devices with client certificats. changed it to 20mb:

    C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.webServer/serverRuntime /uploadReadAheadSize:"20971520" /commit:apphost

    C:\Windows\System32\inetsrv\appcmd.exe set config "Default Web Site" -section:system.webServer/serverRuntime /uploadReadAheadSize:"20971520" /commit:apphost

    iisreset /restart

    Thanks alot ;-)

    Monday, December 02, 2013 3:39 PM
  • Awesome, that worked perfectly for me! Exchange 2010, seperate CAS, IOS7 devices with client certificats. changed it to 20mb:

    C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.webServer/serverRuntime /uploadReadAheadSize:"20971520" /commit:apphost

    C:\Windows\System32\inetsrv\appcmd.exe set config "Default Web Site" -section:system.webServer/serverRuntime /uploadReadAheadSize:"20971520" /commit:apphost

    iisreset /restart

    Thanks alot ;-)

    That was the fix.  I took it a step further in IIS7 for security, performed the change only at ActiveSync level instead of the root:

    "Default Web Site/Microsoft-Server-ActiveSync" This way the larger header is only allowed at the ActiveSync connection and with required Certificate, other wise you run the DOS attack risk when set above 64k.

    Tony


    Tony

    Tuesday, March 18, 2014 4:41 PM
  • Hi Tony,

    Do I have to use both commands:

    C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.webServer/serverRuntime /uploadReadAheadSize:"20971520" /commit:apphost

    C:\Windows\System32\inetsrv\appcmd.exe set config "Default Web Site" -section:system.webServer/serverRuntime /uploadReadAheadSize:"20971520" /commit:apphost

    Or only the last one?

    C:\Windows\System32\inetsrv\appcmd.exe set config "Default Web Site" -section:system.webServer/serverRuntime /uploadReadAheadSize:"20971520" /commit:apphost

    Marc

    Monday, March 31, 2014 3:22 PM
  • Marc,

    All you need is:

    C:\Windows\System32\inetsrv\appcmd.exe set config "Default Web Site/Microsoft-Server-ActiveSync" -section:system.webServer/serverRuntime /uploadReadAheadSize:"20971520" /commit:apphost

    OR change from within the IIS Management Tool (as pictured)

    Then run IISRESET from and administrator command prompt.


    Tony

    Wednesday, April 02, 2014 1:48 PM