项目结构: DALFactory 反射代码反射 //使用缓存 private static object CreateObject(string AssemblyPath,string classNamespace) { object objType = DataCache.GetCache(classNamespace); if (objType == null) { try { Assembly assm = Assembly.Load(AssemblyPath);//第一步:通过程序集名称…
最近采用工厂模式反射DAL层出现一些问题,所以自己想写一下自己认为标准解决的思路和解决方法以备后用. 1.这是项目结构 2.这是DALFactory 反射代码 #region 创建对象(不使用缓存) /// <summary> /// 创建对象(不使用缓存) /// </summary> /// <param name="AssemblyPath"></param> /// <param name="ClassNamesp…
关于反射Assembly.Load("程序集").CreateInstance("命名空间.类") 而不管在哪一层写这段代码其中的("程序集")读取的实际是web层bin文件夹下的dll,也就是说你反射的类的程序集dll在web层的bin下必须有 Assembly.Load("程序集名") Assembly.LoadFrom("程序集实际路径") 说到加载程序集,有两种方法Assembly.LoadFrom…
调用 Application.Restart重启程序出错 解决办法,就是给程序的.exe文件,加上下面的设置…
yum安装包时报错: Could not retrieve mirrorlist http://mirrorlist.repoforge.org/el6/mirrors-rpmforge error was : PYCURL ERROR - "couldn't connect to host" http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/repodata/repomd.xml: [Errno 14] PYCURL ERROR - &qu…
让360双核浏览器默认极速模式,避免采用IE模式无法正常访问html5网页的解决办法 用Meta标签代码让360双核浏览器默认极速模式不是兼容模式<meta name="renderer" content="webkit" /><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 网站大量采用了html5和css3,希望用户都以we…
yum安装包时报错: Could not retrieve mirrorlist http://mirrorlist.repoforge.org/el6/mirrors-rpmforge error was 14: PYCURL ERROR 7 - "couldn't connect to host" http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/repodata/repomd.xml: [Errno 14]  PYCURL ERROR …
npm中npm install 始终出错解决办法 错误信息: C:\Windows\System32>npm install -g gulp npm ERR! Windows_NT 6.1.7601 npm ERR! argv “C:\Program Files\nodejs\\node.exe” “C:\Program Files\nodejs \node_modules\npm\bin\npm-cli.js” “install” “-g” "gulp" npm ERR! no…
ARM64平台编译stream.netperf出错解决办法 http://ilinuxkernel.com/?p=1738 stream编译出错信息: [root@localhost stream]# make gcc -O2 -DSTREAM_ARRAY_SIZE=1000000000 stream.c -o stream /tmp/ccCGEF5F.o: In function `checkSTREAMresults': stream.c:(.text+0x144): relocation…
dpkg:处理 xxx (--configure)时出错解决办法今早安装nfs时出现问题,找到该文,备份留用.然后在网上找到了这片文章,按步骤走就解决了,中间会提示自动卸载一下,执行那个命令就好了,我遇到的情况是在ubuntu上使用apt-get安装软件的时候出现如下错误:正在设置 nfs-common (1:1.2.2-4ubuntu5) ...dpkg:处理 nfs-common (--configure)时出错: 子进程 已安装 post-installation 脚本 返回了错误号 10…