Tuesday, May 10, 2011

How to fix SharePoint 2010 excel service error "System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances"?

If you enable to display excel file in browser on SahrePoint 2010, you could setup using the following steps.

Go to list library such as Shared Document -> Library -> Library Settings->Advanced settings->Opening Documents in the Browser -> select "Open in the browser".

However, we run into error listed bellow:

ExcelService.PostProcessRequest: Excel Server Exception: System.TypeInitializationException: The type initializer for 'Microsoft.Office.Excel.Server.CalculationServer.ExcelServerApp' threw an exception. ---> System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)     at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)     at Microsoft.Office.Server.Diagnostics.ULS.SendWatsonOnExceptionTag(UInt32 tagID, ULSCatBase categoryID, String output, Boolean fRethrowException, TryBlock tryBlock, CatchBlock catchBlock, FinallyBlock finallyBlock) .....

In order to resolve this issue, you could try the following procedures.

  1. Verify Excel Services Application is running correctly from central admin
  2. Verify Excel Calculation Services is in Started status
  3.  Restart the Excel Calculation Services
If Excel Calculation Services restart could resolve it, the worst case is you need to restart SharePoint 2010 servers and this issue should be resolve. I'm not sure the root cause of the issues right now. If you have better idea on this, please share with me.


  1. Both Excel Service Application and Excel Calculation Services were started in my case. I tried to stop and then re-start calculation services, but it didn't have any effect: the error continued to come up. Only IISreset seemed to do the trick for me, but I still haven't figured out why it happened in first place.

  2. Nice post. Great blog. Thanks for the share. Keep posting such kind of information on your blog. I bookmarked it for continuous visit.
    html5 video player| html5 player

  3. I have no words for this great post such a awe-some information i got gathered. Thanks to Author.
    html5 audio player| html5 audio player