Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Security Token Error

$
0
0

I have completed the Tom Hollander's blog on the "using service bus topics and subscriptions with WCF" http://blogs.msdn.com/b/tomholl/archive/2011/10/09/using-service-bus-topics-and-subscriptions-with-wcf.aspx?wa=wsignin1.0

The client piece is working just fine.  The service1 and service2 works fine when I run it from VS Studio.  Once, I've published the services onto local IIS, it's not working anymore.  The event viewer shows the security token service warning error:

Security Token Service warning: System.DirectoryServices.AccountManagement.PrincipalServerDownException: The server could not be contacted. ---> System.DirectoryServices.Protocols.LdapException: The LDAP server is unavailable.

at System.DirectoryServices.Protocols.LdapConnection.Connect()

at System.DirectoryServices.Protocols.LdapConnection.SendRequestHelper(DirectoryRequest request, Int32& messageID)

at System.DirectoryServices.Protocols.LdapConnection.SendRequest(DirectoryRequest request, TimeSpan requestTimeout)

at System.DirectoryServices.AccountManagement.PrincipalContext.ReadServerConfig(String serverName, ServerProperties& properties)

--- End of inner exception stack trace ---

at System.DirectoryServices.AccountManagement.PrincipalContext.ReadServerConfig(String serverName, ServerProperties& properties)

at System.DirectoryServices.AccountManagement.PrincipalContext.DoServerVerifyAndPropRetrieval()

at System.DirectoryServices.AccountManagement.PrincipalContext..ctor(ContextType contextType, String name, String container, ContextOptions options, String userName, String password)

at System.DirectoryServices.AccountManagement.PrincipalContext..ctor(ContextType contextType)

at Microsoft.Cloud.ServiceBus.Common.Security.SecurityExtensions.IsDomainController()

at Microsoft.Cloud.ServiceBus.Common.Security.SecurityExtensions.TryOrDefault[T](Func`1 func, Boolean trace)

And I've attached the web.config file as well, I'm running everything within a single Virtual machine, and the user ID that I'm using has the administrative privileges.

    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="true" />
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="securityBehavior">
          <transportClientEndpointBehavior>
            <tokenProvider>
              <windowsAuthentication>
                <stsUris>
                  <stsUri value="https://LUHUAHSI-SB:9355/PubSubExample" />
                </stsUris>
              </windowsAuthentication>
            </tokenProvider>
          </transportClientEndpointBehavior>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <bindings>
      <netMessagingBinding>
        <binding name="messagingBinding" closeTimeout="00:03:00" openTimeout="00:03:00" receiveTimeout="00:03:00" sendTimeout="00:03:00" sessionIdleTimeout="00:01:00" prefetchCount="-1">
          <transportSettings batchFlushInterval="00:00:01" />
        </binding>
      </netMessagingBinding>
    </bindings>
    <services>
      <service name="ServiceBusPubSub.ServiceOne.Service1">
        <endpoint name="Service1"
                  listenUri="sb://LUHUAHSI-SB/PubSubExample/topic1/subscriptions/sub1"
                  address="sb://LUHUAHSI-SB/PubSubExample/topic1"
                  binding="netMessagingBinding"
                  bindingConfiguration="messagingBinding"
                  contract="ServiceBusPubSub.Contracts.IAccountEventNotification"
                  behaviorConfiguration="securityBehavior" />
      </service>
    </services>
  </system.serviceModel>



Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>