Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8994089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:20:41+00:00 2026-06-15T23:20:41+00:00

I seem to run into the same problem over and over again when I

  • 0

I seem to run into the same problem over and over again when I am trying to host a WCF service in Windows Server AppFabric that uses netmessagingbinding to receive messages from Windows Service Bus 1.0 queues. AppFabric aborts the service, so if I press F5 on service?wsdl then I sometimes get failures, sometimes I get a nice WSDL generated. Where is my mistake? It is rather impossible to find an example that uses AppFabric, netmessagingbinding and Windows Service Bus (not Azure), so I haven’t been able to finde my mistake…

[ServiceContract]
public interface ISBMessageService
{
    [OperationContract(IsOneWay = true, Action = "DoSomething")]
    [ReceiveContextEnabled(ManualControl = true)]
    void DoSomething(string something);
}

[ServiceBehavior]
public class SBMessageService : ISBMessageService
{
    [OperationBehavior]
    public void DoSomething(string something)
    {
        Trace.WriteLine(String.Format("You sent {0}", something));

        // Get the BrokeredMessageProperty from the current OperationContext
        var incomingProperties = OperationContext.Current.IncomingMessageProperties;
        var property = incomingProperties[BrokeredMessageProperty.Name] as BrokeredMessageProperty;

        ReceiveContext receiveContext;

        if (ReceiveContext.TryGet(incomingProperties, out receiveContext))
        {
            receiveContext.Complete(TimeSpan.FromSeconds(10.0d));
        }
        else
        {
            throw new InvalidOperationException("...");
        }             
    }
}

<?xml version="1.0"?>
<configuration>
  <appSettings>
  <!-- Service Bus specific app setings for messaging connections -->
  <add key="Microsoft.ServiceBus.ConnectionString"       
      value="Endpoint=sb://LRNcomp/LRNnamespace"/>
  </appSettings>
 <system.web>
     <compilation debug="true" targetFramework="4.0"/>
     <httpRuntime/>
 </system.web>
 <system.serviceModel>
  <!-- These <extensions> will not be needed once our sdk is installed-->
    <extensions>
      <bindingElementExtensions>
        <add name="netMessagingTransport"      type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingTransportExtensionElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </bindingElementExtensions>
  <bindingExtensions>
    <add name="netMessagingBinding" type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingBindingCollectionElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </bindingExtensions>
  <behaviorExtensions>
    <add name="transportClientEndpointBehavior" type="Microsoft.ServiceBus.Configuration.TransportClientEndpointBehaviorElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </behaviorExtensions>
</extensions>
<behaviors>
  <serviceBehaviors>
    <behavior>
      <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
      <serviceMetadata httpGetEnabled="true" httpsGetEnabled="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="True" httpHelpPageEnabled="True"/>
    </behavior>
  </serviceBehaviors>
  <endpointBehaviors>
    <behavior name="securityBehavior">
      <transportClientEndpointBehavior>
        <tokenProvider>
          <sharedSecret issuerName="owner" issuerSecret="somthing"/>
        </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="SBExamples.SBMessageService">
    <endpoint name="Service1" address="sb://LRNcomp:9354/LRNnamespace/test/myqueue2" binding="netMessagingBinding" bindingConfiguration="messagingBinding" contract="SBExamples.ISBMessageService" behaviorConfiguration="securityBehavior"/>
  </service>
</services>
</system.serviceModel>
<system.webServer>
  <modules runAllManagedModulesForAllRequests="true"/>
  <!--
    To browse web app root directory during debugging, set the value below to true.
    Set to false before deployment to avoid disclosing web app folder information.
  -->
  <directoryBrowse enabled="true"/>
</system.webServer>
</configuration>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:20:42+00:00Added an answer on June 15, 2026 at 11:20 pm

    An error in the WCF contract generated many strange exceptions, like my transport channel was aborted. Proper sharing of contract between sender and receiver did the trick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Seem to run into a service endpoint not found problem when trying to get
I've run into the same problem a lot of people seem to face coming
I've run into another problem in Qt, I can't seem to figure out how
So the problem I've run into is pretty basic, but I can't seem to
I'm trying to make this look pretty, but I've run into a problem. I
I seem to be having the same problem that everyone has with Struts2 and
Problem Solved, thank you all for your help! I've run into a problem that
I seem to run into this situation quite a lot and have yet to
Hi I'm trying to run a calculation but I can't seem to put it
I have run into an interesting problem. I am currently developing php page and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.