• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Any Windows Azure experts here?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Any Windows Azure experts here?

    I'm trying to get a local IIS WCF service to listen on the Azure service bus and it ain't happening.

    Stackoverflow and google aren't helping.

    Our network is setup to correctly allow the service to be called from the outside world as I have proved this by hosting the service in a console app. I just can't get it working hosted in IIS

    and yes, yes, M$ and IIS suck etc.

    #2
    Been using Azure a lot recently.

    Send over your service code/config and I'll have a play.

    Comment


      #3
      Could it simply be a firewall issue? Can you talk to the service bus from that machine?
      merely at clientco for the entertainment

      Comment


        #4
        I have verified the firewall ports are all fine.

        I can self host the WCF service, first in a console app, like the msdn examples, and now I've upgraded that to a Windows Service which will be more robust.

        When done like this, my service end point shows up in the Service Bus directory list and can be called and returns data just fine.

        So... communication is not a problem (unless there is something extra that needs to be done for IIS??)

        I am guessing it's the Auto start stuff you need to do in IIS. I've followed all the samples and it seems like it should be straightforward.

        Auto start on the service, Start immediately and integrated pipeline on the app pool, using net.pipe in the enabled protocols for the site

        It's doing me head in, but hopefully we should be able to live with the Windows Service version.

        Here is an anonymised version of my web.config for the IIS version.

        Code:
        <?xml version="1.0" encoding="utf-8"?>
        <configuration>
          <system.web>
            <compilation debug="true" targetFramework="4.0" />
          </system.web>
          <system.serviceModel>
            <bindings>
              <webHttpRelayBinding>
                <binding name="anonymous">
                  <security relayClientAuthenticationType="None" />
                </binding>
              </webHttpRelayBinding>
              <netTcpRelayBinding>
                <binding name="Hybrid">
                  <security relayClientAuthenticationType="None" />
                </binding>
              </netTcpRelayBinding>
            </bindings>
            <behaviors>
              <endpointBehaviors>
                <behavior name="MyBehaviour">
                  <serviceRegistrySettings discoveryMode="Public" displayName="My Service" />
                  <transportClientEndpointBehavior credentialType="SharedSecret">
                    <clientCredentials>
                      <sharedSecret issuerName="Listener" issuerSecret="MYSECRET"></sharedSecret>
                    </clientCredentials>
                  </transportClientEndpointBehavior>
                </behavior>
                <behavior name="MyBehaviourRest">
                  <serviceRegistrySettings discoveryMode="Public" displayName="My Rest Service" />
                  <transportClientEndpointBehavior credentialType="SharedSecret">
                    <clientCredentials>
                      <sharedSecret issuerName="Listener" issuerSecret="MYSECRET"></sharedSecret>
                    </clientCredentials>
                  </transportClientEndpointBehavior>
                  <webHttp />
                </behavior>
              </endpointBehaviors>
              <serviceBehaviors>
                <behavior>
                  <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
                  <serviceMetadata httpGetEnabled="true" />
                  <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
                  <serviceDebug includeExceptionDetailInFaults="false" />
                </behavior>
              </serviceBehaviors>
            </behaviors>
            <services>
              <service name="MyService">
                <endpoint address="" binding="basicHttpBinding" contract="My.NameSpace.IContract"></endpoint>
                <endpoint address="Rest" binding="webHttpBinding" contract="My.NameSpace.IContract"></endpoint>
                <endpoint address="https://MYURL.servicebus.windows.net/MyService" behaviorConfiguration="MyBehaviour" binding="basicHttpBinding" contract="My.NameSpace.IContract"></endpoint>
                <endpoint address="sb://MYURL.servicebus.windows.net/MyServiceNet" behaviorConfiguration="MyBehaviour" binding="netTcpRelayBinding" contract="My.NameSpace.IContract"></endpoint>
                <endpoint address="https://MYURL.servicebus.windows.net/MyServiceRest" behaviorConfiguration="MyBehaviourRest" binding="webHttpRelayBinding" bindingConfiguration="anonymous" contract="My.NameSpace.IContract"></endpoint>
              </service>
            </services>
            <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
            <extensions>
              <!-- In this extension section we are introducing all known service bus extensions. User can remove the ones they don't need. -->
              <behaviorExtensions>
                <add name="connectionStatusBehavior" type="Microsoft.ServiceBus.Configuration.ConnectionStatusElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <add name="transportClientEndpointBehavior" type="Microsoft.ServiceBus.Configuration.TransportClientEndpointBehaviorElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <add name="serviceRegistrySettings" type="Microsoft.ServiceBus.Configuration.ServiceRegistrySettingsElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
              </behaviorExtensions>
              <bindingElementExtensions>
                <add name="netMessagingTransport" type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingTransportExtensionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <add name="tcpRelayTransport" type="Microsoft.ServiceBus.Configuration.TcpRelayTransportElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <add name="httpRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpRelayTransportElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <add name="httpsRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpsRelayTransportElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <add name="onewayRelayTransport" type="Microsoft.ServiceBus.Configuration.RelayedOnewayTransportElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
              </bindingElementExtensions>
              <bindingExtensions>
                <add name="basicHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.BasicHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <add name="webHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WebHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <add name="ws2007HttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WS2007HttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <add name="netTcpRelayBinding" type="Microsoft.ServiceBus.Configuration.NetTcpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <add name="netOnewayRelayBinding" type="Microsoft.ServiceBus.Configuration.NetOnewayRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <add name="netEventRelayBinding" type="Microsoft.ServiceBus.Configuration.NetEventRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <add name="netMessagingBinding" type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingBindingCollectionElement, Microsoft.ServiceBus, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
              </bindingExtensions>
            </extensions>
          </system.serviceModel>
          <system.webServer>
            <modules runAllManagedModulesForAllRequests="true" />
                <directoryBrowse enabled="true" />
          </system.webServer>
        </configuration>
        Last edited by jmo21; 24 January 2012, 12:13.

        Comment


          #5
          Originally posted by jmo21 View Post
          I'm trying to get a local IIS WCF service to listen on the Azure service bus and it ain't happening.

          Stackoverflow and google aren't helping.

          Our network is setup to correctly allow the service to be called from the outside world as I have proved this by hosting the service in a console app. I just can't get it working hosted in IIS

          and yes, yes, M$ and IIS suck etc.
          I remember this happening to me. And you are right, its about the service not started yet because it has not yet received any request. And you cant issue any request if the service hasnt started yet.

          The way I got around that was to create a host and make it listen using a worker role. I have the source somewhere if I can find it.
          Vote Corbyn ! Save this country !

          Comment


            #6
            Originally posted by fullyautomatix View Post
            I remember this happening to me. And you are right, its about the service not started yet because it has not yet received any request. And you cant issue any request if the service hasnt started yet.

            The way I got around that was to create a host and make it listen using a worker role. I have the source somewhere if I can find it.
            I'm not sure that's the answer as I read it as it being a local machine trying to talk to the service bus rather than an Azure machine.

            to be honest after my last attempt to use Azure I'm much happier using AWS for the moment.
            merely at clientco for the entertainment

            Comment


              #7
              Originally posted by fullyautomatix View Post
              I remember this happening to me. And you are right, its about the service not started yet because it has not yet received any request. And you cant issue any request if the service hasnt started yet.

              The way I got around that was to create a host and make it listen using a worker role. I have the source somewhere if I can find it.
              Cheers. Don't worry about looking for the code.

              I have it working hosted in a Windows Service which I can live with.

              Actually, I'm not sure what the best practice is, is there any reason why I should keep going to try and get it hosted in IIS?

              Comment

              Working...
              X