简体   繁体   中英

Issue on IIS about Downloading Files from iOS

I have an iOS App that downloads files from my server. Recently I upgraded my server from Windows Server 2012 to Windows Server 2016. After upgrading suddenly my iOS App started to have trouble downloading files from the new server.

While upgrading my server I also changed my SSL Certificate and started using a Wilcard SSL Certificate. That is why I thought some SSL issue is the reason. But when I try it on the old server I saw my app download files from my old server with no issue.

Then I thought my server is having packet loss. When I tested it after about 9000 packets I saw only one packet loss; so this wasn't the case too.

Then I thought maybe something failed in the IIS that causes a connection loss. When I tested it (IIS Failed Request Logs) i saw nothing problematic.

When I debug iOS App I am seeing following logs. I couldn't find a proper answer to the issue.

Any ideas where to look?

Previous OS & ISS Version: Windows Server 2012 (Build 9200) / IIS 8 (8.0.9200.16384)

Previous OS & ISS Version: Windows Server 2016 (1607 - Build 1493.1593) / IIS 10 (10.0.14393.0)

iOS App Networking Library: AFNetworking

iOS Error Logs:

[] nw_socket_set_receive_low_water_mark setsockopt SO_RCVLOWAT 3537 fd 28 failed: [22] Invalid argument

[] nw_endpoint_handler_add_write_request [49.1 MyIP:443 failed socket-flow (satisfied)] cannot accept write requests

[] tcp_connection_write_eof_block_invoke Write close callback received error: [22] Invalid argument

It was all about HTTP/2 that is default on IIS 10. There is no option to turn it off but i used following registry keys to turn it off completely on the server. Now my files downloading with no issue from iOS.

Of course i have to address the issue on the iOS and let it download files over HTTP/2 but for now it is working.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters

EnableHttp2Tls REG_DWORD 0

EnableHttp2Cleartext REG_DWORD 0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM