CreateServiceUri Method (String, String, String)

ServiceBusEnvironment.CreateServiceUri Method (String, String, String)


Constructs the Service Bus URI for an application, using the specified scheme, service namespace, and service path.

Namespace:   Microsoft.ServiceBus
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

public static Uri CreateServiceUri(
	string scheme,
	string serviceNamespace,
	string servicePath


Type: System.String

The scheme of the URI.

Type: System.String

The service namespace used by the application.

Type: System.String

The service path that follows the host name section of the URI.

Return Value

Type: System.Uri

Returns a Uri that contains the new URI.

Service Bus endpoint URIs must always use the “sb://” protocol; for example sb://

The following example describes how to create a Service Bus URI.

Uri address = ServiceBusEnvironment.CreateServiceUri("sb", serviceNamespace, "EchoService");

Return to top
© 2015 Microsoft