Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / May 2004

Tip: Looking for answers? Try searching our database.

Typecasting problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kelmen Wong - 04 May 2004 03:55 GMT
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?
Kelmen Wong - 04 May 2004 09:04 GMT
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...).

...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.