Events not fired in production environment

P

Pedro Silva

Hi,
I am developing an Visio 2003 add-in in C# an I have a little problem
raising events.

My Delelopment Environment is
Windows server 2003 with the latest patches
VS2003
..NET FW 1.1
Visio Prof 2003 SP2
Visio 2003 SDK

I start developing my add-in based on a sample solution named
FlowChartSample.CSharp provided by Visio 2003 SDK.

On the following example I am tryin to catch the "Shape Added" event on
two different ways:

try
{
// public const short ShapeAdded = (short) -32704;
pageShapeIsOn.Application.EventList.AddAdvise(Utilities.ShapeAdded,new
EventSink(),string.Empty,string.Empty);
// Another way to raise the shape added Event
pageShapeIsOn.ShapeAdded += new
EPage_ShapeAddedEventHandler(shapeAddedToPageEventHandler);

}
catch (Exception err)
{
Utilities.WriteError(err);
}

Both ways of raising the event work well when I debug the solution
(Visual Studio starts the Visio 2003).
But when I install a setup (provided in the same
FlowChartSample.CSharp) in another machine the previous code runs well
but the events are never catched by its events handlers and there are
no exceptions raised.

The machine where I install the setup has the follwing environment:
windows server 2003 with the latest patches
..NET FW 1.1
Visio Prof 2003 SP2

Can somebody help me?
Thank you,

Pedro Silva
Portugal
 
C

Chris [Visio MVP]

Things to check:

- Did you change the GUID at the top of the Connect class so that it's
different from the flowcharter solution? (wouldn't work on your machine
either, probably)

- Macro-security settings on target machine

- There's some stuff about strong-naming assemblies and deployment on other
machines that I haven't completely learned yet...

- Referencing Visio Type Library in GAC and not a generated TypLib?

Not sure that these are even the problems, but they're probably good to
check anyway. Sorry I don't have more for ya!
 
P

Pedro Silva

(1) No I did not changed the GUID.

(2) Macro security settings are both configured to "Low".
Referencing Visio Type Library in GAC and not a generated TypLib?
What do you mean? What I did was sign (giving it a stong name) the
add-in assembly and on the production machine (where I installed the
setup) I reinstalled the add-in and
mannually I placed the assembly on the GAC. After that I "fully
trusted" the assembly on the .NET configuration. I think this is the
low security level for an signed assembly can run.

The problem continues ...

Thanks a lot for your reply.

Pedro
 
P

Pedro Silva

These are my reference settings to Microsoft.Office.Interop.Visio.dll
assembly.

Name <--> Microsoft.Office.Interop.Visio
Copy Local <--> False
Culture <--> 0
Description <--> Microsoft Visio 11.0 Type Library
Identity <--> {00021A98-0000-0000-C000-000000000046}\4.b\0\primary
Path <-->
C:\WINDOWS\assembly\GAC\Microsoft.Office.Interop.Visio\11.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Visio.dll
Runtime Version <-->
String Name <--> True
Type <--> ActiveX
Version <--> 4.11
 

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