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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:52:50+00:00 2026-05-28T04:52:50+00:00

I have a WCF application hosted as a webrole in Azure with the following

  • 0

I have a WCF application hosted as a webrole in Azure with the following configuration. I am getting a 400 Bad Request when trying to access any of the three service wsdl in a browser or when trying to set up a proxy.

<?xml version="1.0"?>
    <configuration>

        <appSettings>
        </appSettings>

        <system.web>
            <customErrors mode="Off"></customErrors>
            <compilation debug="true" targetFramework="4.0" />
        </system.web>

        <connectionStrings></connectionStrings>

        <system.diagnostics>      
        <sharedListeners> 
          <add name="AzureLocalStorage" type="Example.AzureLocalStorageTraceListener, Example"/> 
        </sharedListeners> 
        <sources> 
          <source name="System.ServiceModel" switchValue="Verbose, ActivityTracing"> 
            <listeners> 
              <add name="AzureLocalStorage" /> 
            </listeners> 
          </source> 
          <source name="System.ServiceModel.MessageLogging" switchValue="Verbose"> 
            <listeners> 
              <add name="AzureLocalStorage" /> 
            </listeners> 
          </source> 
        </sources>  
       </system.diagnostics>

        <system.serviceModel>
            <services>
                <service name="Service1" behaviorConfiguration="MetaBehavior">
                    <endpoint address="http://example.com/service1.svc" binding="basicHttpBinding" name="basicEndpoint1" contract="IService1" />
                </service>
                <service name="Service2" behaviorConfiguration="MetaBehavior">
                    <endpoint address="http://example.com/service2.svc" binding="basicHttpBinding" name="basicEndpoint2" contract="IService2" />
                </service>
                <service name="Service3" behaviorConfiguration="MetaBehavior">
                    <endpoint address="http://pexample.com/service3.svc" binding="basicHttpBinding" name="basicEndpoint3" contract="IService3" />
                </service>
            </services>
            <behaviors>
                <serviceBehaviors>
                    <behavior name="MetaBehavior">
                        <serviceDebug includeExceptionDetailInFaults="true" />
                        <serviceMetadata httpGetEnabled="true"/>
                        <serviceThrottling maxConcurrentSessions="90" />
                    </behavior>
                </serviceBehaviors>
            </behaviors>
            <serviceHostingEnvironment multipleSiteBindingsEnabled="false" aspNetCompatibilityEnabled="true" />
        </system.serviceModel>

        <system.webServer>
            <modules runAllManagedModulesForAllRequests="true"/>
        </system.webServer>

    </configuration>

I am pretty sure my configuration is not right but I need a little guidance with what is incorrect.

An interface is defined as:

[ServiceContract(Name = "Service1", Namespace = "http://example.com")]
public interface IService1
{
    [WebGet]
    [OperationContract]
    Result Create();
} 
  • 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-05-28T04:52:51+00:00Added an answer on May 28, 2026 at 4:52 am

    You’re using the wrong binding, try webHttpBinding instead of basicHttpBinding. Your contract is set to WebGet which is WCF’s take on a quasi-REST based service. BasicHttpBinding is only for soap based bindings (hence the “Bad request” exception).

    EDIT:
    Since the WebGet was present, I assumed you didn’t want soap endpoints. Below is a config that supports both soap and WebGet. I don’t know how different Azure is from standard IIS but you should probably use relative addresses for your service. IIS will only support relative addresses in the service config.

    <system.serviceModel>
        <services>
            <service name="Service1" behaviorConfiguration="Service.Behavior">
                <endpoint address="Service1"
                          binding="basicHttpBinding"
                          contract="IService1"
                          bindingNamespace = "http://example.com"
                          bindingConfiguration="HttpBasic" />
                <endpoint address="mexService1"
                          binding="mexHttpBinding"
                          contract="IMetadataExchange"
                          bindingNamespace = "http://example.com"/>
                <endpoint address="webService1"
                          binding="webHttpBinding"
                          behaviorConfiguration="webBehavior"
                          contract="IService1"
                          bindingNamespace = "http://example.com"
                          name="webHttp"
                          listenUriMode="Explicit" />
            </service>
            <service name="Service2" behaviorConfiguration="Service.Behavior">
                <endpoint address="Service2"
                          binding="wsHttpBinding"
                          contract="IService2"
                          bindingNamespace = "http://example.com"
                          bindingConfiguration="HttpStandard" />
                <endpoint address="mexService2"
                          binding="mexHttpBinding"
                          contract="IMetadataExchange"
                          bindingNamespace = "http://example.com"/>
                <endpoint address="webService2"
                          binding="webHttpBinding"
                          behaviorConfiguration="webBehavior"
                          contract="IService2"
                          bindingNamespace = "http://example.com"
                          name="webHttp"
                          listenUriMode="Explicit" />
        </services>     
        <behaviors>
            <endpointBehaviors>
                <behavior name="webBehavior" >
                    <webHttp />
                </behavior>
            </endpointBehaviors>
            <serviceBehaviors>
                <behavior name="Service.Behavior">
                    <serviceMetadata httpGetEnabled="true"/>
                    <serviceDebug includeExceptionDetailInFaults="false"/>
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <bindings>
            <basicHttpBinding>
                <binding name="HttpBasic" receiveTimeout="00:10:00" maxReceivedMessageSize="2048000">
                    <security mode="None"/>
                </binding>
            </basicHttpBinding>
            <wsHttpBinding>
                <binding name="HttpStandard" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxReceivedMessageSize="2048000">
                    <security mode="None">
                        <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
                        <message clientCredentialType="None" negotiateServiceCredential="false" algorithmSuite="Default" establishSecurityContext="false" />
                    </security>
                </binding>
                <binding name="Https" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxReceivedMessageSize="2048000">
                    <security mode="Transport">
                        <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
                        <message clientCredentialType="None" negotiateServiceCredential="false" algorithmSuite="Default" establishSecurityContext="false" />
                    </security>
                </binding>
                <binding name="HttpsAuthenticated" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxReceivedMessageSize="2048000">
                    <security mode="Transport">
                        <transport clientCredentialType="Ntlm" proxyCredentialType="None" realm="" />
                    </security>
                </binding>
            </wsHttpBinding>
        </bindings>
    </system.serviceModel>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

assume I have a hosted wcf service in a console application like this: public
I have this WCF application which is hosted as a windows service. This service
I have IIS-Hosted WCF application and services. I want to automate the process to
I have a WCF application, running on .NET 3.5 SP1, hosted in IIS7, on
I have my WCF Service hosted in Windows Service. The client application is a
I have my WCF Service hosted in Windows Service. The client application is a
I have a WCF service hosted in a Windows Forms application (.NET C# 4).
I have a WCF service which is hosted in a WinForms application. This WCF
Hi, I have a WCF service hosted in IIS7 that runns the following code
I have developed a WCF Service Application hosted in IIS 7.5 targeting .NET 3.5

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.