反射与remoting的问题,高手来

米的向日葵 2010-03-17 09:32:26
I'm trying to programm a little server to load at runtime
an assembly and Register a Class as WellKnownServiceType.

The architecture is this: (with other names)
CommonTypeLibrary
- with interface IComponent definition

ComponentTypeLibrary (Reference to CommonTypeLibrary)
- with class CComponent definition, inherits
MarshalByRefObject and implement IComponent

Server
- which load at runtime CommponentTypeLibrary and
register CComponent as WellKnow...

Client (Reference to CommonTypeLibrary)
- which try to access the serviced component by the
IComponent

I make several tests, first doing it like the HOW-TO way
and work. when I tried to make de Load at runtime I get
an error not while registerring the component, but yes
when the cliente try to access it (so, when the server
create the object)

I check and the assemblies of the ComponentTypeLibrary
(the two: one for IComponent and the one for CComponent)
are loaded.

Probably it's just a problem of loading or something with
Reflection. I'm still looking but if someone has an
idea... wellcome.
...全文
64 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
米的向日葵 2010-03-17
  • 打赏
  • 举报
回复
不好意思,刚好在网上找到有人遇到相同的问题就拷贝过来了,就懒得在描述一遍问题,大家凑活一下
米的向日葵 2010-03-17
  • 打赏
  • 举报
回复
如果需要例子代码留下邮箱,我可以发测试代码,要是能解决这个问题,或者能解释清楚引发此问题的原因,另外100分相送
wiki14 2010-03-17
  • 打赏
  • 举报
回复
sorry,my english is not good.
米的向日葵 2010-03-17
  • 打赏
  • 举报
回复
to wiki14:看清楚题目先

17,741

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 .NET Framework
社区管理员
  • .NET Framework社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧