RSS 2.0 Feed
收集的.net Remoting 相关文章
收集的.net Remoting 相关文章
摘要:需要在服务器段作如下配置:<configuration> <system.runtime.remoting> <!-- 模式属性的有效值为 on - 调用方接收默认的错误消息 remoteOnly - 远程组件所在的计算机上的客户端接收 异常的详细信息。远程调用接收 默认的错误消息 off - 调用方接收异常的详细信息 --> <customErrors mode="on"/> </system.runtime.remoting> </configuration> 注意:  <customErrors mode="on"/>在 </system.runtime.remoting> 之内. 我有一次错误的把 <customErrors mode="on"/> 配在   <system.runtime.remoting>    <application> 之间了,结果咋调试都不对,极度郁闷....[阅读全文]

posted @ | Feedback (0) |

摘要:以下两篇文章涉及到这个技术,为了自己方便寻找,特收集到这里. 跨域或者Internet访问Remoting[Remoting FAQ] http://www.cnblogs.com/zhengyun_ustc/archive/2006/06/09/remoting_InvalidCredentialException.html Identity flow across Remoting Layers http://forums.asp.net/thread/1626741.aspx...[阅读全文]

posted @ | Feedback (0) |

摘要:来源:http://llf.hanzify.org/llf/show.asp?ID=390 .Net Remoting Hello world 示例(接口版) 作者:梁利锋阅读全文]

posted @ | Feedback (2) |

摘要:出处:http://rickie.cnblogs.com/archive/2004/11/19/65706.html 如何使用基于接口的Remote Objects的配置文件     在开发.Net Remoting Components时,可以通过使用Remoting Configuration file来简化代码并提高配置的灵活性,在article《.Net Remoting配置文件的用法》中有比较详细的介绍。   但是,如果Client端没有Remote Objects的具体实现,只有引用interface,则Client端的configuration file就不行了(Server端应该不存在这种情况)。当然,你可以使用如下的代码得到Remote Object: IHome objHome = (YourNameSpace.BusinessFacade.IHome)Activator.GetObject(typeof(YourNameSpace.BusinessFacade.IHome), “http://<ip address>/YourApplicationName/remotingObject.soap”); 注:这里IHome假设是由Server和Client端共享的interface定义。 这样将Remote URL编码在代码里面,显然就没有使用Configuration文件配置灵活了。   针对上述问题,由如下几种解决办法: 1. 通过在Client的配置文件<appSettings>增加entry 如:<add key="Home.Location" value="http://<ip address>/ YourApplicationName/remotingObject.soap" />   然后,通过ConfigurationSettings.AppSettings["Home.Location"];来获取Remote URL。   2. Ingo’s RemotingHelper class Ingo是《Advanced .Net Remoting》一书的作者,RemotingHelper class在Reference 1的URL可以查到。 通过使用RemotingHelper class,你可以像使用正常的Remoting Configuration配置文件一样来配置Remote URL。   下面看看代码实现部分: (1) RemotingHelper class using System; using System.Collections; using System.Runtime.Remoting;   // 根据传入的type类型,从Hashtable中获取WellKnownClientTypeEntry,然后通过调用Activator.GetObject()方法,得到需要的Remote Object。 class RemotingHelper {   private static bool _isInit;   private static IDictionary _wellKnownTypes;     public static Object GetObject(Type type) {     if (! _isInit) InitTypeCache();     WellKnownClientTypeEntry entr = (WellKnownClientTypeEntry) _wellKnownTypes[type];       if (entr == null) {       throw new RemotingException("Type not found!");     }       return Activator.GetObject(entr.ObjectType,entr.ObjectUrl);   }     // 负责初始化Hashtable, 并根据Remoting Configuration配置文件填入Remote Object Type和WellKnownClientTypeEntry。   public static void InitTypeCache() {     _isInit = true;     _wellKnownTypes=......[阅读全文]

posted @ | Feedback (1) |