Donnerstag, 11. November 2010

ExcelServices "You do not have permissions to open this file."

Today I spent hours to solve a problem most annoying. I walked through Microsoft's tutorial you can find here how to use SharePoint 2010 Excel Services to open an Excelsheet uploaded to a SharePoint-Library.

I implemented the not really complex example with the result... that nothing worked like expected. Always when the debugger was in the line of sessionId = es.OpenWorkbook(...), I've got an exception with the nothing-telling message "You do not have permissions to open this file.".

So I searched for solutions and hints at Google but all those tips there (change Excel Service Application-Settings, modify Trusted Locations, etc.) didn't work.

At last I tried something, I had in mind all the time but somehow it was too obvious that it wouldn't be the solution for my problem. And ha! As I tried anyway just for fun, it suddenly worked.
All I did, was to change the Location Type for my library in which the excel was uploaded to "HTTP". All the time before it didn't worked, this setting for here was "Microsoft SharePoint Foundation".



2 Kommentare:

nosvnn hat gesagt…

I encounted this exact problem and after trying countless suggestions, I finally found the solution:

Open IIS manager > Open the web app where the document resides > IIS > Authentication > Disable ASP.NET Impersonation.

nosvnn hat gesagt…
Dieser Kommentar wurde vom Autor entfernt.