Επεξεργασία

Κοινή χρήση μέσω


WebScriptServiceHostFactory.CreateServiceHost(Type, Uri[]) Method

Definition

Creates a derived class of ServiceHost for a specified type of service with a specific base address that can be used to automatically enable ASP.NET AJAX endpoints in certain scenarios.

protected:
 override System::ServiceModel::ServiceHost ^ CreateServiceHost(Type ^ serviceType, cli::array <Uri ^> ^ baseAddresses);
protected override System.ServiceModel.ServiceHost CreateServiceHost (Type serviceType, Uri[] baseAddresses);
override this.CreateServiceHost : Type * Uri[] -> System.ServiceModel.ServiceHost
Protected Overrides Function CreateServiceHost (serviceType As Type, baseAddresses As Uri()) As ServiceHost

Parameters

serviceType
Type

The type of service to host.

baseAddresses
Uri[]

The Array of type Uri that contains the base addresses for the service hosted.

Returns

A ServiceHost for the type of service specified with the specified base address.

Exceptions

Another service uses the same base address, or another endpoint is using the same address as the ASP.NET AJAX endpoint that this factory is trying to create.

Remarks

Normally, this method is called automatically by Windows Communication Foundation (WCF) as part of service activation - there is no need to call this method manually.

Applies to