Strange behavior on loading excel addin

T

Thomas Qvist

During the investigation of addin startup times I found (using filemon
utility from sysinternals) that after reading security.config and
enterprisesec.config a csharp source file is written, compiled and
loaded in the temp dir.
It's deleted afterwards, so I don't know what's in it.

I think that this is due to my addin assembly and some security issues,
but i'm not sure what the problem is.

The referenced .dlls are in the Assembly Cache.

My addIn works, but the users are experiencing a very slow startup
(doubled or tripled)

This problem does not occur in a ultralight clean 'hello world' addin,
so I think that it's something to do with my dll's and security.

What's going on?
And how do I speed up the startup?
 
W

Wei-Dong XU [MSFT]

Hi,

Currently I am finding one support professional for you on this issue. When
any update, we will reply here at the first time.

Best Regards,
Wei-Dong XU
Microsoft Product Support Services
This posting is provided "AS IS" with no warranties, and confers no rights.
It is my pleasure to be of assistance.
 
P

Peter Huang [MSFT]

Hi

To troubleshoot such problem, I think we need to follow the steps below.\
1. Try to comment out all the code except the ones generated by IDE wizard.
2. did the speed get improved?
3 If yes, I think you may try to comment the code block one by one to see
what occupy the time.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
T

Thomas Qvist

Hi Peter,

As you can read from the problem description:
This problem does not occur in a ultralight clean 'hello world' addin,
so I think that it's something to do with my dll's and security
(so we have in fact tried your approach - when we start calling code from
other assemblies (dll's), and thus also have to include these in our project,
the problems starts).

The plugin we have problems uses several shared libraries such as:
1) Microsoft.Office.Core (office.dll) version 11.0.5530.0
2) Microsoft.Office.Interop.Excel.dll version 11.0.5530.0
3)... plus 3 of our own dll's (written in c#).
4) and other

Our problem is NOT slow running .net code, but the fact that we can see that
the runtime system (i.e. Excel) creates a 1 MB c# file, and thereafter calls
the c# compiler(csc), creates a dll, and loads this dll.

Our guess is that it has something to do with security (since the file is
created just after the system has loaded the dll rsaenh.dll from the system32
directory).

....but we hope that you and your team can shed some light

Btw. our investigations show that this problems occurs for plugins in both
Microsoft Word, Excel and PowerPoint.
If you are interested in the output from our filemon investigation we can
supply you with the file.

We hope that you can solve the problem based on the current technology --
switching to VSTO 2005 is not an option for our project.

Best regards
Thomas Qvist
 
P

Peter Huang [MSFT]

Hi

I think we have some clarification as below.
1. Your test is based on a .NET COM Addin
The .NET COM Addin for Office will including Microsoft.Office.Core
(office.dll) version 11.0.5530.0 and Microsoft.Office.Interop.Excel.dll
version 11.0.5530.0.
2. Since a clean simple addin will not make the addin slow, so I think the
NET Security check should be OK, because for any managed Addin(whether or
not it is simple or complex), the Security check will do.
3. I guess there may some code in your addin which may cause the addin slow
load.
4. e.g. XmlSerializer will generated temporary assembly, so I think it
would be better if you can add your code into the clean sample one by one
to see what assembly or code cause the problem.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top