Why does Web Reference always end up HTTP when it should be HTTPS?

Ken Smith 130 Reputation points
2025-02-01T05:31:43.35+00:00

Interfax is requiring that HTTPS be used instead of HTTP for their web service. I am unable to get the correct dfs.wsdl in Visual Studio. Here is an email I just sent to Interfax support.

Here is a very interesting observation!

When I use Google Chrome to go to URL: https://ws.interfax.net/dfs.asmx?WSDL I get this portion at the bottom. Note all HTTPS!!

<wsdl:service name="InterFax">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">The InterFAX FAX Web Service allows developers to send faxes from any environment, including VB.NET, Java, C# and any SOAP client. Build 2017-07-07</wsdl:documentation>

<wsdl:port name="InterFaxSoap" binding="tns:InterFaxSoap">
<soap:address location="https://ws.interfax.net/dfs.asmx"/>
</wsdl:port>
<wsdl:port name="InterFaxSoap12" binding="tns:InterFaxSoap12">
<soap12:address location="https://ws.interfax.net/dfs.asmx"/>
</wsdl:port>
<wsdl:port name="InterFaxHttpGet" binding="tns:InterFaxHttpGet">
<http:address location="https://ws.interfax.net/dfs.asmx"/>
</wsdl:port>
<wsdl:port name="InterFaxHttpPost" binding="tns:InterFaxHttpPost">
<http:address location="https://ws.interfax.net/dfs.asmx"/>
</wsdl:port>
</wsdl:service>

When I use Visual Studio 2022 to create or update a Web Reference (or Connected Services) with URL: https://ws.interfax.net/dfs.asmx?WSDL I get this (all HTTP).

<wsdl:service name="InterFax">

<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">The InterFAX FAX Web Service allows developers to send faxes from any environment, including VB.NET, Java, C# and any SOAP client. Build 2017-07-07</wsdl:documentation>

<wsdl:port name="InterFaxSoap" binding="tns:InterFaxSoap">

  <soap:address location="http://ws.interfax.net/dfs.asmx" />

</wsdl:port>

<wsdl:port name="InterFaxSoap12" binding="tns:InterFaxSoap12">

  <soap12:address location="http://ws.interfax.net/dfs.asmx" />

</wsdl:port>

<wsdl:port name="InterFaxHttpGet" binding="tns:InterFaxHttpGet">

  <http:address location="http://ws.interfax.net/dfs.asmx" />

</wsdl:port>

<wsdl:port name="InterFaxHttpPost" binding="tns:InterFaxHttpPost">

  <http:address location="http://ws.interfax.net/dfs.asmx" />

</wsdl:port>
```  </wsdl:service>

 

Is this a bug in Visual Studio???  

Update 2/1/2025 

Using a URL with ?WSDL at the end actually does result in https protocol.

The correct URL to use is: https://ws.interfax.net/dfs.asmx?WSDL

![User's image](/api/attachments/81fa55a1-cc52-4aae-9e8c-b6248fe2e805?platform=QnA)

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
41,987 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ken Smith 130 Reputation points
    2025-02-01T17:16:23.29+00:00

    In the past I was creating a Web Reference in Visual Studio with the URL:

    https://ws.interfax.net/dfs.asmx (without ?WSDL at the end).

    This resulted in http protocol being used. Looking at the app.config (which gets updated when the Web Reference is created) showed http rather than https. The solution is to use the URL:

    https://ws.interfax.net/dfs.asmx?WSDL

    Creating a Web Reference with that URL resulted in https results (most easily confirmed by looking at the updated app.config file).

    I should mention that this Web Reference is used in a .NET Framework windows application.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.