Export (0) Print
Expand All

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
)

Parameters

scheme
Type: System.String
The scheme of the URI.
serviceNamespace
Type: System.String
The service namespace used by the application.
servicePath
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://contoso.servicebus.windows.net/helloservicebus.

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

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

Community Additions

ADD
Show:
© 2015 Microsoft