• MikeAR
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I am currently looking for working .NET samples which use the Bulk API Query, as I am having issues as follows:
1. After creating a job on the SFDC Server, with a single batch with the aim of performing a bulk api query...
2. I request the batch query results and send the following header which asks for the results to be GZipped: Accept-Encoding: gzip
3. I download the response onto Windows Server 2003 using the following (simplified) code: wc.DownloadFile(requestUrl, filename); //(where wc is my .NET web client, requestUrl is the location of the query result on the SFDC Server and filename is the local file into which the GZipped results should be saved).
4. The results file is saved to my local file system successfully , but does not seem to be a valid zip file.

Anny attempt to open / decompress the file (using windows explorer) results in error "The Compressed (zipped) Folder 'my file name' is invalid".

I have also tried downloading the results as a stream and decompressing in memory, but the result is always same, and suggests that the compressed result is not valid.
I am wondering whether there is some type of encoding mismatch as the result is saved to the Windows Server file system.

Any help in the form of working samples would be greatly appreciated.
  • February 16, 2015
  • Like
  • 0

Does anyone have any samples of how to use compression with the BULK API and .net.  I've got CSV working great but as soon as I try to create a job with a contenttype of ZIP_CSV I start getting 400 errors from my HTTPResponse