4 Replies Latest reply on Aug 17, 2016 12:27 PM by scottt63546352

    Coldfusion migration from CF9 to CF11 issues - excel download - untrusted soucre - hence excel contents are blocked

    harshalj31713316

      Hello,

      My name is Harshal Jain working for Edwards UK.

      Earlier we were using CF9 (Coldfusion server version 9) and now we have migrated to CF11 (Coldfusion version 11) . The problem is excel download code which was working fine on CF9 is working partially on CF11 and it blocks the contents of the excel file downloaded - due to security concerns - it treats the source from which the excel is downloaded as - not trusted.

       

      For eg below is the sample code

       

      <cfprocessingdirective pageEncoding="utf-8" />

      <cfsetting enablecfoutputonly="Yes">

      <cfcontent type="application/msexcel;charset=utf-16">

      <cfheader name="Content-Disposition" value="attachment; filename=TEST_Excel.xls">

      <cfoutput>

      <table border="1">

        <tr>

        <th nowrap>Name</th>

        </tr>

         <tr>

        <td nowrap>Mark Waugh</td>

        </tr>

      </table>

      </cfoutput>

       

       

      When the above code is executed on CF9 then - and when this code is executed - and after the excel file is saved on local machine - and while trying to open this excel file - it just says - The file you are trying to open is in different format than specified by the file extension. Verify file is not corrupted etc...........

      But it provides an option to select - Yes or No or Help. When I click on Yes - it allows me to open the file. Thus I can access the file downloaded from CF9.

       

      Now we have updated CF from CF9 to CF11. Same code is executed (webserver is same we just upgraded to CF11 from CF9). When this excel file is downloaded and tried to open - a blank excel gets opened. Nothing is displayed in the excel. Now for this I need to right click on excel file -> Properties -> and then need to unblock the file under Security - under tab - General. Then need to click Apply and Ok.

      Now when I open this excel file -

      it now says - The file you are trying to open is in different format than specified by the file extension. Verify file is not corrupted etc...........

      But it provides an option to select - Yes or No or Help. When I click on Yes - it allows me to open the file.

       

      The problem is all the system users are frustrated and they don't want to unblock the excel every now and then.

       

      Now my question is - why this functionality is changed for CF11 which was working fine on CF9. We just want something like this - when the excel is downloaded from this server, it should treat it as trusted source/secured file and it should open normally.