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 7921323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:32:26+00:00 2026-06-03T16:32:26+00:00

I have a client/server application through windows azure relaying. This works well using a

  • 0

I have a client/server application through windows azure relaying.
This works well using a console application for both server and client.

Now I want to use Windows Phone as a client, but for some reason, I cannot call the servicebus.
I can’t add a web reference and when targeting the url in a browser I get the following message:

<s:Fault xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</faultcode><faultstring xml:lang="nl-NL">The message with Action 'GET' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).</faultstring></s:Fault>

I have entered the following code in the server app.config:

// sb:// binding
            Uri sbUri = ServiceBusEnvironment.CreateServiceUri("sb", serviceNamespace, "blabla");
            var sbBinding = new NetTcpRelayBinding(EndToEndSecurityMode.Transport, RelayClientAuthenticationType.None);
            serviceHost.AddServiceEndpoint(typeof(IMyContract), sbBinding, sbUri);

            // https:// binding (for Windows Phone etc.)
            Uri httpsUri = ServiceBusEnvironment.CreateServiceUri("https", serviceNamespace, "https/" + "blabla");
            var httpsBinding = new BasicHttpRelayBinding(EndToEndBasicHttpSecurityMode.Transport, RelayClientAuthenticationType.None);
            serviceHost.AddServiceEndpoint(typeof(IMyContract), httpsBinding, httpsUri);

And before opening the host, i’m setting the endpoints to discovery mode public.

What else can or do I need to do to make this work with windows phone?

  • 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-03T16:32:29+00:00Added an answer on June 3, 2026 at 4:32 pm

    I think you’re fairly close. By what I gather you can’t add the web reference to your phone project. While that’s possible through that path, I wouldn’t recommend to make the effort to expose the metadata endpoint through the Relay since you will not use it at runtime. Instead, reference the contract into your Windows Phone project and make a ChannelFactory with BasicHttpBinding and the target address for the BasicHttpRelatBinding endpoint on the service side.

    You’ve got everything else set up right by what I can tell, including having ACS turned off on the listener so that you can use the regular BasicHttpBinding on the phone.

    EDIT:

    Since that probably wasn’t completely clear, here’s a service:

    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
    class Program : IEcho
    {
        static void Main(string[] args)
        {
            var sh = new ServiceHost(new Program(), 
                        new Uri("http://clemensv.servicebus.windows.net/echo"));
            sh.Description.Behaviors.Add(
                 new ServiceMetadataBehavior { 
                       HttpGetEnabled = true, 
                       HttpGetUrl = new Uri("http://localhost:8088/echowsdl")});
            var se = sh.AddServiceEndpoint(typeof(IEcho), 
                 new BasicHttpRelayBinding(EndToEndBasicHttpSecurityMode.None, 
                                           RelayClientAuthenticationType.None), String.Empty);
            var endpointBehavior = new TransportClientEndpointBehavior(
                   TokenProvider.CreateSharedSecretTokenProvider("owner", "...key ..."));
            se.Behaviors.Add(endpointBehavior);
            sh.Open();
            Console.WriteLine("Service is up");
            Console.ReadLine();
            sh.Close();
        }
    
        public string Echo(string msg)
        {
            return msg;
        }
    }
    

    The contract IEcho is trivial and not shown. What you’ll notice is that I have a ServiceMetadataBehavior hanging “off on the side” exposed through localhost that will give you WSDL if you hit that URI. You can use that address with the “Add Web Reference” client in Visual Studio to create the proxy on Windows Phone; that proxy will use BasicHttpBinding on the phone. I just did that and it works as expected in a trivial phone app (with the reference renamed to MySvc)

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            var client = new MySvc.EchoClient();
            client.EchoCompleted += OnClientOnEchoCompleted;
            client.EchoAsync("foo");
        }
    
        void OnClientOnEchoCompleted(object sender, EchoCompletedEventArgs c)
        {
            this.textBox1.Text = c.Result;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Silverlight application on the client communicating with the server side through
i have this client/server application, and the client application sometimes completely freezes when i
I have client-server application, where server side is Azure WCF service with data in
I have client/server application where the client app will open files. Those files get
I have a Client/Server application, where the Client and Server have some common tables
I have a client server application in which the server and the client need
I have a client - server application, where I want to add a exception
I have a client server application in which I need to transmit a user
I have a client-server application that utilises MSMQ and NServiceBus for messaging. During some
I have a client/server application with its users and all... The server serialization is

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.