internet explorer - IE unable to download CSV files from SharePoint 2010 document library -
i developed web app in sp2010. entire app done in javascript spservices, since customer (the marine corp.) doesn't want allow .net development in environment. customer wanted able download of reports in excel spreadsheets can whatever them. since it's impossible generate excel spreadsheets in javascript, workaround came generate csv in javascript, , save document library, point browser csv file download. worked perfectly. though wasn't technically excel, customer didn't know better. provided asked for: open report in excel. other day, customer said export stopped working. i've spent day , half trying see what's wrong, find solution, jazz. here's i've noticed:
- the ".csv" extension being changed browser "_csv"
- when click "save" in download dialog, browser reports "[filename]_csv couldn't downloaded [retry] [cancel]"
- when looking @ response headers sp server using protocol analyzer, sp server giving browser correct file name in content disposition
- the problem exists in versions of ie, works fine in ff. no testing done chrome/safari
here's http response headers sp2010 server:
http/1.1 200 ok cache-control private,max-age=0 content-length 27739 content-type application/octet-stream expires sun, 28 jul 2013 13:42:43 gmt last-modified mon, 12 aug 2013 13:42:43 gmt etag "{ae0131b1-3c1d-4e24-bb97-d4d0eb8c69f2},20" server microsoft-iis/7.5 sprequestguid 903d68dc-6f49-4fd8-acbc-2b22c4ee28ef set-cookie wss_keepsessionauthenticated={cbef9658-700b-421b-87d5-08fbdc520faf}; path=/ x-sharepointhealthscore 0 resourcetag rt:ae0131b1-3c1d-4e24-bb97-d4d0eb8c69f2@00000000020 x-content-type-options nosniff content-disposition attachment; filename=test.csv x-download-options noopen public-extension http://schemas.microsoft.com/repl-2 set-cookie wss_keepsessionauthenticated={cbef9658-700b-421b-87d5-08fbdc520faf}; path=/ x-powered-by asp.net microsoftsharepointteamservices 14.0.0.6029 date mon, 12 aug 2013 13:42:42 gmt
since ie seems browser affected, i'm unsure if issue server response. again, come lamp development background, of these headers foreign me. hoping out there in internet-land have idea of what's going on here, or have something give me little clue might have changed (apparently overnight) or problem be.
here's full fiddler capture, url , filename removed security, file contents. had remove these items because it's marine corp. application , data.
get http://removed_for_security/reports/filename.csv http/1.1 accept: */* accept-language: en-us user-agent: mozilla/4.0 (compatible; msie 7.0; windows nt 6.1; wow64; trident/6.0; slcc2; .net clr 2.0.50727; .net clr 3.5.30729; .net clr 3.0.30729; media center pc 6.0; .net4.0c; .net4.0e; mddc; infopath .3) accept-encoding: gzip, deflate host: sp2010dev dnt: 1 connection: keep-alive cookie: wss_keepsessionauthenticated={cbef9658-700b-421b-87d5-08fbdc520faf} http/1.1 200 ok cache-control: private,max-age=0 content-length: 27739 content-type: application/octet-stream expires: sun, 28 jul 2013 19:48:33 gmt last-modified: mon, 12 aug 2013 19:48:33 gmt etag: "{ae0131b1-3c1d-4e24-bb97-d4d0eb8c69f2},30" server: microsoft-iis/7.5 sprequestguid: a39fa60c-5b8c-4b8c-bb8c-bc1f72ab0351 set-cookie: wss_keepsessionauthenticated={cbef9658-700b-421b-87d5-08fbdc520faf}; path=/ x-sharepointhealthscore: 0 resourcetag: rt:ae0131b1-3c1d-4e24-bb97-d4d0eb8c69f2@00000000030 x-content-type-options: nosniff content-disposition: attachment; filename=filename.csv x-download-options: noopen public-extension: http://schemas.microsoft.com/repl-2 set-cookie: wss_keepsessionauthenticated={cbef9658-700b-421b-87d5-08fbdc520faf}; path=/ x-powered-by: asp.net microsoftsharepointteamservices: 14.0.0.6029 date: mon, 12 aug 2013 19:48:32 gmt file_contents
thanks in advance.
which version of ie hitting with? how generating csv file?
the problem sounds one: http://blogs.msdn.com/b/ieinternals/archive/2012/07/16/content-length-and-transfer-encoding-validation-in-ie10-download-manager-couldnt-be-downloaded-retry-cancel.aspx
you might changing content-type proper 1 ("text/csv") eliminate possibility of mime-sniffing.
can collect , share fiddler capture of failing scenario?
Comments
Post a Comment