惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
J
Java Code Geeks
C
Check Point Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Google DeepMind News
Google DeepMind News
阮一峰的网络日志
阮一峰的网络日志
Engineering at Meta
Engineering at Meta
Blog — PlanetScale
Blog — PlanetScale
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
月光博客
月光博客
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
A
About on SuperTechFans
L
LangChain Blog
腾讯CDC
Y
Y Combinator Blog
MongoDB | Blog
MongoDB | Blog
Vercel News
Vercel News
MyScale Blog
MyScale Blog
博客园 - Franky
IT之家
IT之家
博客园_首页

博客园 - Jason.Yi

vs2005代码区出现问题 吉他自录之《回忆组曲》 吉他自录之《爱的罗曼史》 求助:Vs2005 asp.net development server未能开始侦听端口 为什么我的Cookie只能更新一个键值? 对Graphics.DrawImageUnscaledAndClipped的疑虑 哪些原因可能导致SQL操作操时呢? 二个算法题,大家有兴趣来看看 关于博客园的Calendar 费解的.net2.0中的ObjectDataSource控件 FormView在什么情况下自动生成模板项? 生成随机的颜色值 错误:已在多处定义 为什么本地sqlservr.exe进程占用内存如此之大? 这样的页面该如何实现? 简单的生成登录验证码的程序 遇到一个很奇怪的问题 连接SQL Server2005出错 能在web.config里做这样的配置吗?
远程机器上无法用Assembly.Load(path).CreateInstance(ClassN...
Jason.Yi · 2007-08-03 · via 博客园 - Jason.Yi

项目用到工厂模式
public static IDocument CreateIDocument()
        {
            string ClassName = path + ".DocumentSQLDAL";
            return (IDocument)Assembly.Load(path).CreateInstance(ClassName);
        }
这段代码在本地运行一切正常,
但同样的代码用Remoting之后,就发生异常:
System.NullReferenceException: 未将对象引用设置到对象的实例。
   在 Config..ctor()
   在 Config.get_Instance()
   在 DAL.SQLServer.DocumentSQLDAL..ctor()
   --- 内部异常堆栈跟踪的结尾 ---
   在 System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   在 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   在 System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   在 System.Activator.CreateInstance(Type type, Boolean nonPublic)
   在 System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   在 System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   在 System.Reflection.Assembly.CreateInstance(String typeName)
这是为何?