Typecasting problem

  • Thread starter Thread starter Kelmen Wong
  • Start date Start date
K

Kelmen Wong

Greeting,

We have a component featuring "late/dynamic-binding". Its being used
by 2 app, with only the 2nd giving a weired problem.

....

objAssembly = Assembly.LoadFrom(strAssemblySource);

objInterface = (InterfaceX)
m_objAssembly.CreateInstance(strClassName);

....

It worked well for 1 app, but at 2nd app, the objInterface always a
"null", and no error, until its method being executed.

objAssembly - is a (supposed) GAC stuff, as well as the objInterface.
they show up in the GAC list as expected.

The only way so far I can workaround this is by placing the interface
assembly within the 2nd app bin folder. But such is not the case for
1st app.

I debugged all checked:
- the (windows) identify used to invoke this component is identical.
- shouldn't be security issue, as the same also being applied for 1st
app.

the apps are asp.net wep app, all developed with c#.

Can anyone help in this one?
 
The problem gone, after we rectify our project referencing.

Some of the project have referencing to System stuffs, however
unknowningly, these references' "Copy To Local" been set to "true".

After setting all of these System stuffs to "false", removed the
assemblies and rebuild all again, the sys behaved as expected again.

Reason, yet to find out (zzz...).

(e-mail address removed) (Kelmen Wong) wrote in message ....
 
Back
Top