4

We are developing server solution with IIS+fastcgi+django. The main aspect is Excel interoperability-opening files/reading/writing.

When we were working with 32х Win Server 2012 + MS Excel 2007 + IIS7 EnsureDispatch method was working as expected. It opens new Excel instance if it exists and use existent if not.

After we moved to another server with 64x WinServer 2016 + MS Excel 2010 + IIS10 EnsureDispatch starts creating new instances in any case.

I changed many variations of settings in DCOM, IIS and DefaultAppPool, but nothing help

Simon Mourier
  • 132,049
  • 21
  • 248
  • 298
A. Akzhigitov
  • 179
  • 2
  • 14
  • It sounds like something was isolated. Have you checked which part is causing this issue? It was caused by dcom of excel 2010 or just python EnsureDispatch method? First of all, we would like to narrow down the problem. Besides, have you checked access violation or denied issue via process monitor?https://learn.microsoft.com/en-us/sysinternals/downloads/procmon – Jokies Ding Nov 06 '19 at 10:09
  • I filtered process monitor results that was during test request and there were no access violations or denied issues at all. – A. Akzhigitov Nov 06 '19 at 16:10
  • `EnsureDispatch` method works fine from console when I am working on `web` user who is assigned to DefaultAppPool, but when this method is called from django code called by request through IIS it works like no Excel instances stored in ROT(Running object table). But every Excel instance created from django code belongs to `web` user. – A. Akzhigitov Nov 06 '19 at 16:15
  • Changing almost every setting in DCOM leads to AccessDenied when calling EnsureDispatch from django. Just giving all the privileges to `web` user work good – A. Akzhigitov Nov 06 '19 at 16:17
  • What's "IIS EnsureDispatch"? PS: This is basically why hosting desktop Office on the server has never been supported by Microsoft (beyond the licensing issues). – Simon Mourier Nov 10 '19 at 09:57
  • EnsureDispatch is the method from pythoncom module, wrapper around office interoperability. As I said it opens new Excel instance if it not exists and use existent if it is. – A. Akzhigitov Nov 11 '19 at 10:58
  • I tried Google sheets API as replacement for MS Excel, but calculation there takes twice as much. – A. Akzhigitov Nov 11 '19 at 11:00

0 Answers0