Question:
I'm trying to download a file from an HTTPS URL and I keep getting a 405 error for "Method Not Allowed". I have to send XML to request a list of files on the server and then send another XML request to request the individual file. When I call the Download method it fails on the 405. The individual file request works fine and returns the data content in the response but I want to pull the actual file. I have a similar process on the Upload side which works fine so I believe my endpoint is correct.
ChilkatLog: Download: DllDate: Aug 15 2013 ChilkatVersion: 9.4.1.42 UnlockPrefix: AVIDANHttp Username: HP29461209202:Administrator Architecture: Little Endian; 32-bit Language: ActiveX VerboseLogging: 0 backgroundThread: 0 url: https://services.relayhealth.com/AtsWebServices/pub/Batch/SD215498.CI toLocalPath: C:\ClaimRpts\SD215498.CI localFileAlreadyExists: 1 QuickGetToOutput_Download: qGet_1: simpleHttpRequest_3: httpMethod: GET requestUrl: https://services.relayhealth.com/AtsWebServices/pub/Batch/SD215498.CI Connecting to web server... httpServer: services.relayhealth.com port: 443 Using HTTPS. ConnectTimeoutMs_1: 10000 calling ConnectSocket2 IPV6 enabled connect with NO heartbeat. connectingTo: services.relayhealth.com resolveHostname1: Resolving domain name (IPV4) via gethostbyname --resolveHostname1 GetHostByNameHB_ipv4: Elapsed time: 0 millisec myIP_1: 10.123.124.10 myPort_1: 3067 connect successful (1) clientHelloMajorMinorVersion: 3.1 buildClientHello: majorVersion: 3 minorVersion: 1 numRandomBytes: 32 sessionIdSize: 0 numCipherSuites: 10 numCompressionMethods: 1 --buildClientHello readIncomingTls_serverHello: processTlsRecord: processHandshake: handshakeMessageType: ServerHello handshakeMessageLen: 0x46 processHandshakeMessage: MessageType: ServerHello Processing ServerHello... ServerHello: MajorVersion: 3 MinorVersion: 1 SessionIdLen: 32 CipherSuite: RSA_WITH_RC4_128_MD5 CipherSuite: 00,04 CompressionMethod: 0 Queueing ServerHello message. ServerHello is OK. --ServerHello --processHandshakeMessage handshakeMessageType: Certificate handshakeMessageLen: 0x102c processHandshakeMessage: MessageType: Certificate ProcessCertificates: Certificate: derSize: 1372 certSubjectCN: *.relayhealth.com certSerial: 65D12CFCD8BB1BDF495AF74586CEC307 certIssuerCN: VeriSign Class 3 Secure Server CA - G3 --Certificate Certificate: derSize: 1520 certSubjectCN: VeriSign Class 3 Secure Server CA - G3 certSerial: 6ECC7AA5A7032009B8CEBCF4E952D491 certIssuerCN: VeriSign Class 3 Public Primary Certification Authority - G5 --Certificate Certificate: derSize: 1236 certSubjectCN: VeriSign Class 3 Public Primary Certification Authority - G5 certSerial: 250CE8E030612E9F2B89F7054D7CF8FD certIssuerCN: --Certificate NumCertificates: 3 Queueing Certificates message... --ProcessCertificates --processHandshakeMessage handshakeMessageType: ServerHelloDone handshakeMessageLen: 0x0 processHandshakeMessage: MessageType: ServerHelloDone Queueing HelloDone message. --processHandshakeMessage --processHandshake --processTlsRecord --readIncomingTls_serverHello HandshakeQueue: MessageType: ServerHello MessageType: Certificate MessageType: ServerHelloDone --HandshakeQueue Dequeued ServerHello message. Dequeued Certificate message. DequeuedMessageType: ServerHelloDone OK to ServerHelloDone! No client certificate required by the server. Encrypted pre-master secret with server certificate RSA public key is OK. Sending ClientKeyExchange... Sent ClientKeyExchange message. Sending ChangeCipherSpec... Sent ChangeCipherSpec message. Derived keys. Installed new outgoing security params. Sending FINISHED message.. algorithm: arc4 keyLength: 128 Sent FINISHED message.. readIncomingTls_changeCipherSpec2: processTlsRecord: processChangeCipherSpec: ccsProtocolType: 1 --processChangeCipherSpec --processTlsRecord --readIncomingTls_changeCipherSpec2 readIncomingTls_handshakeFinished2: processTlsRecord: processHandshake: handshakeMessageType: HandshakeFinished handshakeMessageLen: 0xc processHandshakeMessage: MessageType: HandshakeFinished FinishedMsgLen: 12 Queueing Finished message. --processHandshakeMessage --processHandshake --processTlsRecord --readIncomingTls_handshakeFinished2 Dequeue the FINISHED message... Dequeued Finished message. Handshake completed successfully. Secure Channel Established. connectElapsedMs: 94 -- BuildGetRequest -- Not auto-adding cookies. Adding Basic Authentication Header login: 215498ATS sendElapsedMs: 0 StatusCode: 405 StatusText: Method Not Allowed contentLength: 980 Reading response body... fetchSslResponseData2_2: No transfer-encoding header field. sslContentLength: 980 extraLen: 980 Already have entire response. --fetchSslResponseData2_2 readResponseElapsedMs: 172 --simpleHttpRequest_3 --qGet_1 --QuickGetToOutput_Download bFileDeleted: 1 totalElapsedMs: 266 ContentLength: 980 Failed. --Download --ChilkatLog