ClrObjectFactory.CreateFromVroot(String, String) 方法

定义

使用远程程序集的虚拟根 URL,通过 .NET 远程处理激活远程程序集。Activates a remote assembly through .NET remoting, using the virtual root URL of the remote assembly.

public:
 virtual System::Object ^ CreateFromVroot(System::String ^ VrootUrl, System::String ^ Mode);
public object CreateFromVroot (string VrootUrl, string Mode);
abstract member CreateFromVroot : string * string -> obj
override this.CreateFromVroot : string * string -> obj
Public Function CreateFromVroot (VrootUrl As String, Mode As String) As Object

参数

VrootUrl
String

要激活的对象的虚拟根目录 URL。The virtual root URL of the object to be activated.

Mode
String

未使用。Not used.

返回

Object

表示此类型的 Object 实例,其区域性、参数以及绑定和激活特性均设置为 null;如果找不到 VrootUrl 参数标识的程序集,将设置为 nullAn instance of the Object representing the type, with culture, arguments, and binding and activation attributes set to null, or null if the assembly identified by the VrootUrl parameter is not found.

实现

例外

调用链中的调用方无权访问非托管代码。A caller in the call chain does not have permission to access unmanaged code.

未能打开线程标记。The thread token could not be opened.

注解

CreateFromVroot 将字符串 "? wsdl" 追加到 VrootUrl ,并调用 CreateFromWsdl 以激活远程对象。CreateFromVroot appends the string "?wsdl" to VrootUrl and calls CreateFromWsdl to activate the remote object.

.NET 远程处理所使用的 SOAP 版本是 RPC/编码的,而不是文档/文字,这是 SOAP 互操作性所必需的。The version of SOAP used by .NET remoting is RPC/encoded, not document/literal, which is required for SOAP interoperability. 因此, CreateFromVroot 不能用于大多数的 "Web 服务"。Therefore, CreateFromVroot will not work with most ASMX Web services.

CreateFromVroot 首次运行时,需要在本地计算机上具有管理权限,因为它会创建和安装客户端代理以与远程程序集通信。CreateFromVroot requires administrative privileges on the local computer the first time it is run, because it creates and installs a client proxy for communication with the remote assembly.

适用于