1

I have a weird problem, i have an silverlight application which uses Interop to execute a piece of code .

My Production server has a complex login procedure and the password never stays the same for a user after a stipulated time. i.e the password keeps changing.

So when i run this application , until any user is logged in the application works well, as soon as the person logs out or the session expires , the interop stops working as it doesn't have an interactive user.

I have read in several posts of this issue and majority like this asks to configure identity in the DCOMCNFG settings. But i am unable to find any microsoft office component (powerpoint,onenote,word,excel...) in my DCOMCNFG but in my local i am able to find it. Also the Interop is not found. The error is referring to this CLSID {00024500-0000-0000-C000-000000000046} .

How can i solve this issues. Is there any problem with the Office installation so as the file should appear in my DCOMCNFG ?

even if it does appear is there a ray of hope through which i can solve the identity problem ? as the password of my production server keeps changing so even if i go to the dcom component and go to identities tab in the properties , will i be able to give "this user" a fixed name and password ? or should i use the launching or interactive user ?

any help would be appreciated.

Community
  • 1
  • 1
staticshockdracoon
  • 41
  • 1
  • 2
  • 10

1 Answers1

0

Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.

You can read more about that in the Considerations for server-side Automation of Office article.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • I agree with your point, but i have written 95% of code using OpenXML and only 5 % using interop. The necessity to use the interop arised as the force recalculation of macros and formulas cannot be done using openxml . So i use interop to open and save the sheetwhich then triggers the recalculation of formulaes. Any inputs for this scenario – staticshockdracoon Feb 05 '15 at 09:40
  • I'd suggest using any third-party components on the server-side as the previously mentioned article suggests. For example, you may find Aspose components helpful. – Eugene Astafiev Feb 05 '15 at 11:49
  • I cannot use any Third party tool nor i can move that to client side. As the client may or may not have office installed or interop . The purpose of the application is just to input the values in the excel , calculate the output using the formulas in the Excel and return the output back. Any suggested work around for this case ?? Recalculation is not happening using OpenXML , and thus only for opening and recalculation of formulas i am using InterOp. Also can you please let me know which components have been made safe for unattended execution :) – staticshockdracoon Feb 06 '15 at 11:20
  • I have already suggested a workaround with third-party components. There is no other way. – Eugene Astafiev Feb 06 '15 at 11:35