.NET Framework Bookmark and Share   
 index > Windows Communication Foundation > How to get .svc file when running on HTTPS
 

How to get .svc file when running on HTTPS

Hi,

I want to pulish a service just to HTTPS only and be able to consume it within Visual Studio 2008 by adding a service reference.

However, if I set httpsGetUrl to https://<myserver>/Services/ServiceName when I navigate to the page it shows the discovery address as

https://<myserver>/Services/ServiceName?wsdl not https://<myserver>/Services/ServiceName.svc?wsdl

Please can you advise me how to configure for HTTPS access only?

Thanks

Rob
Rob Blackmore
did you set httpsGetEnabled="true"?
eg:

<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name = "MetadataBehavior">
<serviceMetadata httpsGetEnabled="true" httpsGetUrl="XXXX"/>
</behavior>
</serviceBehaviors>
</behaviors>
Amit Sharma
Amit Sharma R
Hi,

Thank you for the response.

I did but I still get it showing the location of the wsdl as in my original post which does not allow me to download a reference into Visual Studio


Rob Blackmore
I have the following config and I am able to see svcutil.exe https://SERVERNAME/test?wsdlon the service help page.
can you please compare your config with the one below

<system.serviceModel>
    <services>
      <service name="HttpsWsdl.Service1" behaviorConfiguration="HttpsWsdl.Service1Behavior">
        <endpoint address="https://SERVERNAME/test" binding="basicHttpBinding" contract="HttpsWsdl.IService1" bindingConfiguration="Transport">
        </endpoint>
        <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <bindings>
      <basicHttpBinding>
        <binding name="Transport">
          <security mode="Transport"></security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="HttpsWsdl.Service1Behavior">
          <serviceMetadata httpsGetEnabled="true" httpsGetUrl="https://SERVERNAME/test" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

Amit Sharma
Amit Sharma R
Hi,

I get this as well but you need to see https://SERVERNAME/test.svc?wsdl on the service help page in order to be able to add a service reference within Visual Studio?

Kind regards

Rob
Rob Blackmore

well Yes, but in your original post you asked for that url to be displayed. No?


Amit Sharma
Amit Sharma R

You can use google to search for other answers

Custom Search

More Threads

• Generic Service Operations possible?
• client certificate account mapping
• Please help validate our WCF direction (3 questions)
• WCF service hangs for no apparent reason
• Reading heder info in WCF services.
• Transfermode Buffer/Streaming is best?
• Problem with binary encoded WCF service hosted behind a firewall on a different port
• Emit basic profile conformance claims with basicHttpBinding
• inherited base class isn't included in proxy
• inifnite lifetime of a channel.