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

  • Home
  • SEARCH
  • 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 5850197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T13:06:25+00:00 2026-05-22T13:06:25+00:00

I have a Silverlight 4 application that uses WCF services on the same server

  • 0

I have a Silverlight 4 application that uses WCF services on the same server (self-hosted). Everything works fine, but now I want to convert my WCF services to use SSL. I am using CustomBindings and can’t quite find the combination to get this done. I am using relative URLs on the client side, and hope this is not causing a problem. Here are the important bits of my Web.config file:

    <behaviors>
      <serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true"  />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <dataContractSerializer maxItemsInObjectGraph="6553600"/>
          <serviceTimeouts transactionTimeout="00:10:00"/>
        </behavior>
        </serviceBehaviors>
      </behaviors>

    <bindings>
      <customBinding>
        <binding name="MyApp.Web.Services.ProjectService.customBinding0"
          receiveTimeout="00:10:00" sendTimeout="00:10:00">
          <binaryMessageEncoding />
          <httpsTransport maxReceivedMessageSize="2147483647" />
        </binding>
      </customBinding>
    </bindings>
  <services>
    <service name="MyApp.Web.Services.ProjectService">
        <endpoint address="" binding="customBinding" bindingConfiguration="MyApp.Web.Services.ProjectService.customBinding0"
          contract="MyApp.Web.Services.ProjectService" />
      </service>

My ClientConfig looks like this:

    <configuration>
    <system.serviceModel>
        <bindings>
            <customBinding>
                <binding name="CustomBinding_ProjectService">
                    <binaryMessageEncoding />
                    <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
                </binding>
           </customBinding>
       </bindings>
       <client>
            <endpoint address="../Services/ProjectService.svc" binding="customBinding"
                bindingConfiguration="CustomBinding_ProjectService" contract="SearchProxy.ProjectService"
                name="CustomBinding_ProjectService" />
     </client>
  </system.serviceModel>
</configuration>

I just don’t understand how the bindings work in both the server and client. I’m hoping someone can point me in the right direction.

  • 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-22T13:06:26+00:00Added an answer on May 22, 2026 at 1:06 pm

    A few things:

    If you want to use SSL on localhost you’ll need to be using IIS Express 7.5 (or full IIS if you’re on a server doing dev – unlikely).

    You’ll need a clientaccesspolicy.xml file stored in the root of the Web application:

    <?xml version="1.0" encoding="utf-8"?>
        <access-policy>
           <cross-domain-access>
               <policy>
                   <allow-from http-request-headers= "SOAPAction">
                       <domain uri="https://*"/>
                   </allow-from>
                   <grant-to>
                        <resource path="/" include-subpaths="true"/>
                   </grant-to>
               </policy>
           </cross-domain-access>
         </access-policy>
    

    Example server-side Web.config:

    <system.serviceModel>
      <bindings>
        <basicHttpBinding>
          <binding name="SecureBasicHttpBinding">
            <security mode="Transport">
              <transport clientCredentialType="Certificate" />
            </security>
          </binding>
        </basicHttpBinding>
      </bindings>
    
      <behaviors>
        <serviceBehaviors>
          <behavior name="SomeBehavior" >
            <serviceMetadata httpsGetEnabled="true"/>
            <serviceDebug includeExceptionDetailInFaults="true"/>
            <useRequestHeadersForMetadataAddress>
              <defaultPorts>
                <add scheme="https" port="443" />
              </defaultPorts>
            </useRequestHeadersForMetadataAddress>
          </behavior>
        </serviceBehaviors>
      </behaviors>
    
      <serviceHostingEnvironment>
        <serviceActivations>
          <add relativeAddress="SomeService.svc" service="MySilverlight.Web.SomeService"/>
        </serviceActivations>
      </serviceHostingEnvironment>
    
      <services>
        <service name="MySilverlight.Web.SomeService"
                 behaviorConfiguration="SomeBehavior">
    
          <endpoint address="SomeService"
                    binding="basicHttpBinding"
                    bindingConfiguration="SecureBasicHttpBinding"
                    bindingNamespace="https://MySilverlight.Web.SomeService"
                    contract="MySilverlight.Web.ISomeService">
          </endpoint>
    
          <endpoint address="mex"
                    binding="mexHttpsBinding"
                    contract="IMetadataExchange" />
        </service>
      </services>
    </system.serviceModel>
    

    Example client-side:

    <?xml version="1.0" encoding="utf-8"?>
       <configuration>
          <system.serviceModel>
              <bindings>
                  <basicHttpBinding>
                      <binding name="BasicHttpBinding_ISomeService" maxBufferSize="2147483647"
                           maxReceivedMessageSize="2147483647">
                          <security mode="Transport" />
                      </binding>
                  </basicHttpBinding>
              </bindings>
              <client>
                  <endpoint address="https://localhost/SomeService.svc/SomeService"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISomeService"
                contract="MySilverlight.Web.SomeServiceReference.ISomeService"
                name="BasicHttpBinding_ISomeService" />
             </client>
        <extensions />
        </system.serviceModel>
    </configuration>
    

    IIS 7.5 will setup your localhost certificate automatically.

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

Sidebar

Related Questions

We have a Silverlight application that uses WCF Data Services. We want to add
I have a Silverlight application that uses WCF RIA Services. I'd like to be
I have a Silverlight / WCF RIA Services application that uses EF 4. Currently,
I am working on a Silverlight application that uses WCF. I need to have
I have a silverlight application that uses wcf service. This application is shown from
I have a Silverlight application that uses RIA Services. One of the entities is
I have a Silverlight application that communications with an ASP.NET backend through WCF. I
I have a Silverlight 2 application that is consuming a WCF service. As such,
I have a silverlight 2 beta 2 application that accesses a WCF web service.
I have an application that uses Silverlight and ASP.NET as a front-end. It retrieves

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.