Eksporter (0) Skriv ut
Vis alt
EN
Dette innholdet er ikke tilgjengelig på ditt språk, men her er den engelske versjonen.
1 av 4 vurderte dette som nyttig - Vurder dette emnet

Development How To

This section contains a set of common how-to tasks related to development using the Service Bus for Windows Server.

Service Bus Development How-to

How to use REST with the Service Bus

The Service Bus for Windows Server offers REST API for runtime and management operations similar to the API offered by the Windows Azure Service Bus. For a detailed description of Service Bus REST support, see the Windows Azure Service Bus REST API Reference. There are some differences in using REST with the Service Bus for Windows Server.

How to use the Service Bus while offline (for example, from your laptop)

The Service Bus for Windows Server enables developers to develop and test applications while being offline or without access to the domain. With the Service Bus for Windows Server, you can use the credentials of a local user, similar to domain users.

To use a local user with your application, do the following:

  1. Modify your service namespace (or create a new one) and add the local user as one of the manageUsers by calling the Set-SBNamespace cmdlet. Note that this call overrides the existing manageUsers list.

  2. Modify your code to create a TokenProvider object with credentials for the local user. For example:

    TokenProvider localUserTokenProvider = WindowsTokenProvider.CreateWindowsTokenProvider(
                    connBuilder.StsEndpoints,
                    new System.Net.NetworkCredential (userName, password));
    
    MessagingFactory factory = MessagingFactory.Create(
                connBuilder.GetAbsoluteRuntimeEndpoints(), localUserTokenProvider);
    NamespaceManager namespaceManager = new NamespaceManager(
                connBuilder.GetAbsoluteManagementEndpoints(), localUserTokenProvider);
    


Build Date:

2013-10-18
Vurderte du dette som nyttig?
(1500 tegn igjen)
Takk for tilbakemeldingen

Fellesskapsinnhold

Vis:
© 2014 Microsoft. Med enerett.