The underlying connection was closed. An unexpected error occurred on a receive

Product:
Cognos Controller 8.5.1
Windows 2008 Server R2

Symptom:
When you run F9 in excel report you get a error message during the “Calling RunReport” process. You have activated Enhanced report optimization by doing this in the excel sheet:
1. Select cell A1 on the first sheet of the workbook.
2. Go to the menu Insert / Name / Define
3. Type in the name Optimise2 and click Add and then OK
4. Save the report
When you next run or refresh the report, ERO is used.

Error message:
Standard Error
Number: 5
Source
FrangoDirect. ExcelLinkD. FetchValuesBulk # ControllerProxyClient
Description: The underlying connection was closed. An unexpected error occurred on a receive.

Cause:
You have create the share \\servername\ero$ on the application server and given everyone full rights on the share.

You have enter the correct values in controller configuration for ERO, as this:
File mode: File Copy
Server: applicationservername
Share: ero$
(and left the rest of the fields blank)

But you have not given the SQL service account access rights to the NTFS.

Solution:
Right click on the ERO folder
Select Properties
Select Security tab
Click EDIT to change permissions
Click ADD
enter the name of the service account (e.g. domain\username) and click CHECK NAMES
Click OK
Mark Allow – Modify check box
Click APPLY
Click OK