HOW TO:為主應用程式定義域註冊伺服器啟動的物件和用戶端啟動的物件

下列範例將說明如何註冊主應用程式 (Host Application) 定義域的伺服器啟動物件和用戶端啟動物件。 <activated> 標記中的 type 屬性表示物件在 <wellknown> 標記中所顯示的完整型別名稱和組件名稱。

範例

<configuration>
   <system.runtime.remoting>
      <application>
         <service>
           <wellknown
             mode = "SingleCall" 
             type = "myType,myAssembly"
             objectUri = "myType.soap"
           />
           <activated
             type="MyActivatedType, TypeAssembly"
           />
         </service>
      </application>
   </system.runtime.remoting>
</configuration>

請參閱

參考

System.Runtime.Remoting.RemotingConfiguration Class

概念

伺服器端註冊
遠端應用程式的組態
遠端物件組態

其他資源

使用組態檔註冊遠端物件
NET Framework 遠端處理概觀

Footer image

Copyright © 2007 by Microsoft Corporation. All rights reserved.