RTD Server samples all return N/A - Office 14.0.7116.5000 x86 & Windows Server 2008 R2 x64

751 views
Skip to first unread message

Tom Keirl

unread,
Sep 4, 2014, 7:16:29 AM9/4/14
to exce...@googlegroups.com
Hey everybody

Following from my previous research and development into using an RTD server for some functionality I was developing, I've hit a snag with deployment. My RTD server is working perfectly, in the environments in which it works, and the performance I'm getting by using it is great.

But I'm getting some problems with the RTD server component on Office 14.0.7116.5000 32-bit & Windows Server 2008 R2 [Version 6.1.7600] 64-bit, which is really worrying me because I can't find any good reason for it not to work? I'm deploying it to a trusted program files path.

All RTD functions, the one I've developed, and all the ones from the distributed ExcelDNA samples, all return ExcelErrorNA, and show "#N/A" in the cells.

Here are some of the things I tried and the outcomes:
  • Took my RTD server implementation, recompiled against the source of ExcelDNA whilst outputting debugging symbols and delved as deep under the bonnet as I could, on the target server, with a remote debugger, all the way to the point of failure - which is just the Excel12V API function setting the pResultOper to "ExcelErrorNA" on the RTD function call. This error code of 42 though isn't telling me anything :(
  • Monitored Excel.exe using Procmon.exe and watched all the relevant on-the-fly registration Current User registry entries being created successfully, and read successfully, etc.
  • My user account was loaded with a temporary user profile (due to lack of roaming support across the domains I have in my development lab environment), but even when logging in as a local administrator on this server with a local profile, no change.

  • Failure characterised by the "Rtdsrv.{ProgIDGUID}" being listed under "Inactive Application Add-ins" when viewing the list of Add-ins visible from under the File menu, but I don't know how it qualifies it as an inactive Add-in? Same happens when loading any of the samples from the distribution.

  • Triple checked all Trust Center options, even under the most liberal settings it just refuses to work and stubbornly returns N/A.
  • Digitally signed all my deliverables using a test certificate, including the XLL (not strong named though?), and installed the relevant code signing authority as a root authority on the server, certificate listed as valid. Still no change.
  • Scoured the event logs, including the program specific logs, but couldn't find anything of interest relating to RTD servers or COM automation.

I feel like there is something I'm missing, if I could just "activate" the inactive "rtdsrv.xxx" add-in, or get some more debug/diagnostic information from the API call as to why it is failing, then I could get some valuable insight.

Has anyone got any advice for how I should proceed with diagnostics as to why it might not be working? How about the COM interface for IRTDServer not being "registered" properly? I'm not sure how I would test that. Do I need some kind of COM service loaded? I've not got much experience with COM.


Many thanks!

Tom

Govert van Drimmelen

unread,
Sep 4, 2014, 4:58:17 PM9/4/14
to exce...@googlegroups.com
Hi Tom,

First check is to see whether RTD updating is not set to manual on that machine:
1. Open the VBA IDE (Alt+F11)

2. Go the the Immediate Window

3. Type in
? Application.RTD.ThrottleInterval

4. Check that the result is 2000 (the default). If it's -1, it explains your problem. If it's 0, I can't remember what the story is.
It's milliseconds and the default is 2000. If it's set to something else, set it with
Application.RTD.ThrottleInterval = 2000


Once that's done, you could try this:
1. Check that your security settings in Excel are relaxed. In the Trust Center check:
  * Under Add-ins, nothing is selected.
  * Under ActiveX settings, "Prompt me before enabling all controls with minimal restrictions." and not "Safe Mode".
  * Under Macro settings: "Enable all macros"

2. Check that there are no Disabled Items. Under Options -> Add-Ins, look at the bottom for "Manage:" and select "Disabled Items". Enable anything you see there.

3. From the Excel-DNA v 0.32 distribution (which you can get from https://exceldna.codeplex.com/releases/view/119190):
  * take Distribution\Samples\RTD\ExcelRtdServer.dna and put into a new directory. 
  * take Distribution\ExcelDna64.xll and put in the same new directory.

4. Rename the two files to "MyNewTest.dna" and "MyNewTest.xll".

5. Check that there is a C:\Temp\ directory with reasonable permissions (the RTD server tries to write a log file there). You can also check the location in the .dna file to a friendly directory.

6. Open the MyNewTest.xll in Excel (Either File->Open or just double-click on the .xll).

7. Check that the =GetExcelVersion() function works. (It should be 15.0)

8. Check whether the =WhatTimeIsIte() function works.

9. Check whether the log file in C:\Temp\ExcelDnaRTD.log was written, and has anything in.

If that doesn't work, we're entering the realm of anti-virus software and the EMET security app....

-Govert

Tom Keirl

unread,
Sep 5, 2014, 6:35:13 AM9/5/14
to exce...@googlegroups.com
Hey again Govert!

I tried all of the above into the night, ThrottleInterval as expected, the non-RTD functions were working fine and return as expected, the security settings were all as expected. I did take the ExcelRTDServer sample and ran it with the log, and it said that the RTD server was being created, but there was no mention of the actual RTD server doing stuff like connecting and disconnecting topics as per the logs from another machine. There was no 3rd party anti-virus software installed (other than what comes with vanilla W2k8 R2).

In the end, I chose to escalate my efforts and reinstalled Office (+ patches to get to 14.0.7116.5000), on the VM, and with much surprise (plus a bit of relief), it now works?! The nuclear option would have been to reinstall Windows. In reflection, I speculate this is maybe all my fault, as I may have fallen foul of the following advice: Install Programs on an RD Session Host Server. My machine was running an RD Session Host server.

I sent a prototype of my add-in across to the deployment team to have a quick go on the production environment (which is a similar software stack to my virtual setup) to check if this problem was going to resurface, but it works fine.

So, panic over, but I imagine this will be a useful thread for others should they encounter similar issues!


Many thanks for your advice!

Tom

Govert van Drimmelen

unread,
Sep 5, 2014, 8:02:32 AM9/5/14
to exce...@googlegroups.com

Hi Tom,

 

Thanks for reporting back on this.

 

I’m glad things are working now.

 

Cheers,

Govert

--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at http://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages