亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 編程 > .NET > 正文

Using Web Services for Remoting over the Internet.

2024-07-21 02:21:48
字體:
來源:轉載
供稿:網友
introduction
this article describes a design and implementation (c#) of the remoting over internet using the web service as a gateway into the remoting infrastructure. the web service gateway (custom remoting channel) allows to enhance the remoting channel over internet and its chaining with another heterogeneous channel. consuming a remote object over internet is full transparently and it doesn't require any special implementation from the remoting via intranet. the web service gateway enables to create a logical model of the connectivity between the different platforms and  languages. before than we will go to its implementation details, let's start it with usage and configuration issue. for some demonstration purpose i will use a msmq custom remoting channel (msmqchannellib.dll), which i described in my previously article [][1]#[1]]1]. i am assuming that you have a knowledge of the .net remoting and web service.
usage
consuming a remote object over internet using the web service gateway is very straightforward and it actually requires only to install the following assemblies:
  • webservicechannellib , this is a custom remoting channel on the client side to forward a remoting message to the web service gateway over internet (outgoing message).
  • webservicelistener, this is a web service (gateway) to listen an incoming message from the client side and forward it to the local remoting infrastructure (incoming message).

note that the above assemblies have to be installed (into the gac) both on the server and client sides when a remote callback is used.  
the next step is to configure a server and client host sides. their configuration are depended from the actually application. let me assume, we want to call a remote object driven by msmq custom channel over internet. their config files might look like the following snippets:
server.exe.config
<configuration>
<system.runtime.remoting>
  <application >
   <service>
    <wellknown mode="singleton" type="myremoteobject.remoteobject, myremoteobject"
               objecturi="endpoint" />
   </service>
   <channels>
   <channel type="rkiss.msmqchannellib.msmqreceiver, msmqchannellib"
            listener="./reqchannel"/>
   <channel type="system.runtime.remoting.channels.tcp.tcpchannel, system.runtime.remoting"
            port="8090" />
   </channels>
  </application>
</system.runtime.remoting>
</configuration>
the above server config file will register two channels to listen an incoming message for the remote well known singleton object.
client.exe.config
this is an example of the client config file to register our custom remoting channel.
<configuration>
<system.runtime.remoting>
  <application>
   <client >
    <wellknown type="myremoteobject.remoteobject, remoteobject"
               url="ws://localhost/webservicelistener/listener.asmx;
               tcp://localhost:8090/endpoint/remoteobject" />
   </client>
   <channels>
    <channel type="rkiss.webservicechannellib.sender, webservicechannellib" mode="soap"/>
   </channels>
  </application>
</system.runtime.remoting>
</configuration>
the ws is a custom remoting client channel to dispatch an imessage over internet using a binary respectively soap mode formatter. note that the mode is a customchannelproperty and its default value is binary.
web.config
this is a web service config file. the following snippet is its part. the web service gateway is also a local remoting client, therefore a client (sender) channel is requested to be registered. the following snippet shows a configuration of the two channels - tcp and msmq.
<system.runtime.remoting>
<application >
  <channels>
   <channel type="system.runtime.remoting.channels.tcp.tcpchannel, system.runtime.remoting"/>
   <channel type="rkiss.msmqchannellib.msmqsender, msmqchannellib"                  
            respond="./rspchannel" admin="./adminchannel" timeout="30" priority="10"/>
  </channels>
</application>
</system.runtime.remoting>
activating a remote object
the well known remote object (wko) is activated by its consumer using the getobject method mechanism. the proxy is created based on the remote object metadata assembly installed in the gac (see an argument objecttype). the remoting channel is selected by the objecturl argument. the url address in this solution has two parts :
  • connectivity to the web service gateway over internet
  • connectivity to the remote object over intranet within the web service gateway

between the primary and secondary addresses is a semicolon delimiter as it is shown the below:
string objecturl = @"ws://localhost/webservicelistener/listener.asmx; msmq://./reqchannel/endpoint";
using this objecturl design pattern allows an easy selection of the web service gateways on the internet. note that the ws custom remoting channel will trim this primary address and forward only its secondary part. in this solution, the objecturl represents a physical path of the logical connectivity between the consumer and remote object regardless of how many channels are needed. in this example, the web service gateway resides on the localhost and it should be replaced by the real machine name.
finally, the following code snippet shows an activation of the remote object:
// activate a remote object
type objecttype = typeof(myremoteobject.remoteobject);
string objecturl = @"ws://localhost/webservicelistener/listener.asmx; msmq://./reqchannel/endpoint";
remoteobject ro = (remoteobject)activator.getobject(objecttype, objecturl);
note that a metadata (assembly) of the remote object must be installed into the gac in the places such as client, web service gateway and server host.
that's all for the client/remoteobject plumbing issue over the internet.
the following pictures shows this connectivity:


    
now, to understand how the message flows between the heterogeneous channels over the internet, have a look at the following paragraphs:
 

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
午夜精品久久久99热福利| 日本精品免费一区二区三区| 欧美午夜精品久久久久久浪潮| 亚洲福利视频免费观看| 亚洲尤物视频网| 国产噜噜噜噜噜久久久久久久久| 欧美成人午夜视频| 精品国产户外野外| 国产精品电影网| 欧美怡红院视频一区二区三区| 亚洲精品久久久久国产| 91探花福利精品国产自产在线| 91亚洲午夜在线| 亚洲国产欧美一区| 视频一区视频二区国产精品| 亚洲欧洲自拍偷拍| 久久综合伊人77777蜜臀| 成人欧美一区二区三区在线湿哒哒| 4388成人网| 亚洲色图五月天| 国产一区二区在线免费视频| 日韩专区中文字幕| 久久99国产精品久久久久久久久| 精品magnet| 色综合五月天导航| 日韩在线视频观看正片免费网站| 96精品视频在线| 91在线中文字幕| 亚洲精美色品网站| 亚洲va国产va天堂va久久| 91精品国产高清久久久久久久久| 日韩激情av在线免费观看| 亚洲欧洲在线视频| 国产精品嫩草视频| 精品国产一区二区三区久久久| 国产精品三级久久久久久电影| 欧美精品xxx| 国产精品久久精品| 91精品视频免费看| 国产精品极品美女粉嫩高清在线| www国产精品com| 91伊人影院在线播放| 亚洲级视频在线观看免费1级| 91大神在线播放精品| 在线视频欧美日韩| 大量国产精品视频| 色视频www在线播放国产成人| 91亚洲精品一区二区| 高清一区二区三区日本久| 亚洲天堂av女优| 91精品国产成人www| 日本亚洲欧美成人| 亚洲精品一区二区三区婷婷月| 久久久伊人欧美| 成人激情在线观看| 亚洲第一区第一页| 伦理中文字幕亚洲| 91精品国产综合久久香蕉的用户体验| 欧美专区福利在线| 亚洲天堂av图片| 国产精品免费在线免费| 精品久久久久久久久久ntr影视| 欧美成年人视频网站| 97精品国产97久久久久久免费| 色偷偷噜噜噜亚洲男人的天堂| 成人444kkkk在线观看| 亚洲97在线观看| 亚洲国产另类 国产精品国产免费| 国产一区二区免费| 精品二区三区线观看| 亚洲国产高清福利视频| 91在线视频免费| 亚洲精品一区中文| 国产精品丝袜久久久久久不卡| 韩国精品久久久999| 91精品国产99| 日本久久久a级免费| 久久精品国产一区二区三区| 午夜精品www| 成人在线精品视频| 亚洲白虎美女被爆操| 亚洲精品久久视频| 伊人一区二区三区久久精品| 亚洲色图五月天| 亚洲伦理中文字幕| 欧美极品美女电影一区| 亚洲午夜未满十八勿入免费观看全集| 亚洲福利在线观看| 国产69精品久久久久9| 一区二区三区视频观看| 欧美一级免费看| 国产成人精品在线| 国产成一区二区| 中文字幕日韩欧美精品在线观看| 亚洲男人的天堂在线播放| 久久99视频免费| 成人97在线观看视频| 91av免费观看91av精品在线| 亚洲一区二区在线播放| 国产欧美日韩91| 88国产精品欧美一区二区三区| 在线精品91av| 国语自产精品视频在线看抢先版图片| 91高清视频在线免费观看| 亚洲美女www午夜| 美女视频黄免费的亚洲男人天堂| 欧美黄色小视频| 成人网中文字幕| 91沈先生作品| 97欧美精品一区二区三区| 欧美激情性做爰免费视频| 国产午夜精品麻豆| 日韩中文字幕精品| 日韩高清人体午夜| 色婷婷久久一区二区| 成人国产精品久久久久久亚洲| 亚洲精品视频中文字幕| 欧美日韩国产一区在线| 久久免费成人精品视频| 日韩美女免费观看| 欧美一级电影在线| 欧美电影免费观看高清完整| 欧美日韩电影在线观看| 亚洲国产美女久久久久| 亚洲伊人成综合成人网| 久久久97精品| 亚洲自拍偷拍色图| 国产精品1区2区在线观看| 成人动漫网站在线观看| 91av视频导航| 91亚洲国产成人久久精品网站| 亚洲色图色老头| 亚洲91精品在线观看| 爽爽爽爽爽爽爽成人免费观看| 欧美超级免费视 在线| 国产一区二区三区直播精品电影| 欧美又大又硬又粗bbbbb| 国产精品久久久久高潮| 色综合影院在线| 亚洲天堂av高清| 在线观看日韩www视频免费| 一区二区欧美在线| 国产精品久久久av久久久| 国产日韩在线精品av| 精品久久久久久亚洲国产300| 亚洲成年网站在线观看| 亚洲精品中文字幕av| 亚洲国产精品成人精品| 欧美富婆性猛交| 欧美色xxxx| 日韩欧美在线中文字幕| www.国产精品一二区| 97在线免费观看视频| 2021久久精品国产99国产精品| 精品视频中文字幕| 亚洲高清一二三区| 欧美视频不卡中文| 97国产一区二区精品久久呦| 中文字幕一精品亚洲无线一区| 在线观看国产成人av片| 欧美亚洲另类制服自拍| 国产91免费观看| 97色在线视频观看| 中文字幕日韩精品在线|