When we are developing above sharepoint platform, some error occurs is inevitable, but we can find the cause step by step.
1. turn on debug function on sharepoint to show the real error message.
To enable detailed error messages in the browser do the following in web.config
<SafeMode MaxControls="200" CallStack="false"… /> change to <SafeMode MaxControls="200" CallStack="true" … />
The customError setting must be changed to "Off": <customErrors mode="Off"/>
After these changes, the "An unexpected error has occurred" should no longer be shown and you should a standard ASP.NET error page2. find the error event ID in application, and search that on google, in most cases, we can find solution.
for example, my error event ID is 5439, and message is rel="File-List" href="file:///C:%5CUsers%5Cv-payu%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"> rel="themeData" href="file:///C:%5CUsers%5Cv-payu%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"> rel="colorSchemeMapping" href="file:///C:%5CUsers%5Cv-payu%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml">
There was an error in communicating with Excel Calculation Services http://svmrrdev05:56737/SSP - MSSORR/ExcelCalculationServer/ExcelService.asmx exception: The request failed with an empty response.
[Session: (null)
User: NORTHAMERICA/v-payu].
after search, I find the solution.
rel="File-List" href="file:///C:%5CUsers%5Cv-payu%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"> rel="themeData" href="file:///C:%5CUsers%5Cv-payu%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"> rel="colorSchemeMapping" href="file:///C:%5CUsers%5Cv-payu%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml">
To work around this, some configuration on web.config for sharepoint are nessary to make excel service work smoothly.
Method: Find the following code snippet in web.config file, and change proxy autodetect = false
<system.net>
<defaultProxy>
<proxy autoDetect=”false” />
</defaultProxy>
</system.net>