Issues with .NET addin, web-services, and shimming

  • Thread starter Sergey Anchipolevsky
  • Start date
S

Sergey Anchipolevsky

Hi, all

I'm sorry for a long post, but the problems I'm trying to solve look weird
and seem to need some detailing.

The initial issue consists in that my C# addin stops working when another
..NET addin is installed. The only "another" addin is actually Lookout (http://www.lookoutsoft.com),
since I had no change to try some other. But I would expect the same effect
with other .NET addins.

My addin communicates with a remote web-service using an autogenerated stub
class, located in a separate "reused" assembly. This assembly also contains
a lot of other hand-made code.

Once Lookout was installed, I've started receiving the exception "assembly
or one of its dependencies is not found" pointing at the "reused" assembly.
The strange thing is that this exception only occurs when calling the web-service
stub, while the rest of the code in the "reused" assembly executes with no
problems.

The stub class intself depends on the following assemblies only:

mscorelib,
system,
system.web.services,
system.xml

The exception is thrown inside System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke()
when receiving a response from the server. I suspect that Invoke() fails
finding the data classes when trying to deserialize the incoming XML document.
These classes are placed inside the "reused" assembly as well.

The thrown exception contains an inner IOException ("file not found"), the
information in which lets me conclude, that the framework tries to find the
"reused" assembly within the Office folder, not the folder where my assemblies
are actually located.

It's worth mentioning that my addin executes in the default application domain,
unlike Lookout which uses shimming and executes in it's own domain.

When only I deinstall Lookout, everything works fine.


After I applied shimming, the problem disappeared (it's interesting why?)
but another was introduced. I use IEHost for displaying HTML data, and somehow
it interfers with Outlook's functions related to showing HTML in folders
and messages. Wherever Outlook displays HTML, a totally blank content is
shown. Sometimes a dialog window appears, saying it's unable to show the
data, and offers me to save it into a file. And what's most curious, to get
the effect I don't even have to create or call IEHost from my addin. Just
referencing the interop classes is quite enough. Removing all the references
helps -- Outlook starts showing HTML.

Note, that it happens not on all machines and only when I use the shim module.
(lt's generated with a wizard by Microsoft).


Could anyone please explain me these problems?


Configuration: Outlook 2003, .NET Framework v1.1.4322, WinXP SP2


WBR,
Sergey Anchipolevsk
 

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