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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:37:43+00:00 2026-06-07T00:37:43+00:00

In Visual Studio 2010, I am trying to connect to a web service I

  • 0

In Visual Studio 2010, I am trying to connect to a web service I have written. I am trying to include the web service project in my WPF solution so I can debug locally, if necessary but, I would also be happy to just publish the web service to my local IIS and connect to it that way.

Here’s what happens. I include the web service project in my WPF solution so, I have two projects…the WPF and the WCF web service. I try to add a service reference to my WPF project by opening the Add Service Reference dialog box and clicking the “Discover” button. In the address bar, this uri appears:

http://localhost:49185/MyAppSqlServerProvider.svc

I give the service a name in the Namespace text box, and then I click “OK”. Then, I receive the following error:

System.InvalidOperationException: Could not find a base address that matches scheme https for the endpoint with binding WSHttpBinding. Registered base address schemes are [http].

This seems to be a common error. I have found lots of posts about it, and about how to fix it but, I haven’t been able to apply those solutions to my situation and get them to work.

Here is the relevant portion of my web.config file

  <system.serviceModel>
<services>
  <service behaviorConfiguration="MyAppDataSync.MyAppSqlServerProviderBehavior"
    name="MyAppDataSync.MyAppSqlServerProvider">
    <endpoint address="" binding="wsHttpBinding" contract="MyAppDataSync.IMyAppSqlServerProvider" bindingConfiguration="wsHttpBindingConfiguration">
      <identity>
        <dns value="localhost" />
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost/MyAppSqlServerProvider/"/>
      </baseAddresses>
    </host>
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="MyAppDataSync.MyAppSqlServerProviderBehavior">
      <!-- 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="true"/>
    </behavior>
  </serviceBehaviors>
</behaviors>
<bindings>
  <wsHttpBinding>
    <binding name="wsHttpBindingConfiguration" maxReceivedMessageSize="10485760">
      <readerQuotas maxArrayLength="10485760" />
      <security mode="Transport">
        <transport clientCredentialType="None">
          <extendedProtectionPolicy policyEnforcement="Never" />
        </transport>
      </security>
    </binding>
  </wsHttpBinding>
</bindings>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

By the way: I am using transport security because I need to use sessions for this service. (ex: [ServiceContract(SessionMode = SessionMode.Required)])

If anyone can advise me on what I have gotten wrong in my setup, I would really appreciate it. (Why does the “49185” port number get added to the localhost address?)

Thanks in advance for any help you can provide.

  • 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-07T00:37:45+00:00Added an answer on June 7, 2026 at 12:37 am

    You need to change your base address to specify “https” rather than “http”.

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

Sidebar

Related Questions

I'm trying to consume a SharePoint 2010 web service via Visual Studio 2010. I
I have a WCF-Service, written in Visual Basic using Visual Studio 2010. I would
We have developers using Visual Studio 2010 professional and some trying out Visual Studio
I'm trying to make a password protected project in Visual Studio 2010. Is there
In Visual Studio 2010, I'm trying to build an COM-interop enabled C# project without
I'm trying to connect SQL Server 2008 R2 to Visual Studio 2010. It seems
I'm trying to build a visual web part for SharePoint 2010 which should connect
I'm trying to connect to SQL Server 2008 express database from Visual Studio 2010
I'm currently migrating a project to Visual Studio 2010 and am trying to figure
Info: C#, Visual Studio 2010 I am trying to access the existing service references

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.