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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:32:28+00:00 2026-06-09T07:32:28+00:00

I have to consume a web service in a secure server, in https, with

  • 0

I have to consume a web service in a secure server, in https, with certificate and login.

So i make a Service reference in VS2008.

    static void Main(string[] args)
    {
        Console.WriteLine("Value of code TR3A ?\n");
        String codeTR = Console.ReadLine();

        string responseFromServer ="";
        System.Net.ServicePointManager.CertificatePolicy = new MyPolicy();

        serviceTrains.TrainServiceClient myTrainService = new serviceTrains.TrainServiceClient();

        responseFromServer = myTrainService.GetListTrainsAtGare(codeTR).ToString();

        console.WriteLine(responseFromServer);
    }

In my console app, I want to write the json wich I retrieve, but i have an error :

InvalidOperationException : The Address property on ChannelFactory.Endpoint was null. The ChannelFactory’s Endpoint must have a valid Address specified.

but if i go to https://blabla.com/TrainService.svc/GetListTrainsAtGare/COE it works …

another problem : i can’t make myTrainService.Credentials , why ??

  • 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-09T07:32:30+00:00Added an answer on June 9, 2026 at 7:32 am

    The error is telling you that you don’t have an endpoint specified. Normally, the web service reference will store the endpoint where you got the wsdl from in the app.config but you might have generated the code a different way and there is no default provided.

    In your code you could try the following if the service has the Url property.

    myTrainService.Url = "https://blabla.com/TrainService.svc/GetListTrainsAtGare/COE";
    

    It’s also a good idea to put the endpoint in the config and reference the entry through System.Configuration.ConfigurationManager

    To address your second question, maybe more suited for another SO question:
    You will have to provide more context about the connection type and security expected to get an accurate answer.

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

Sidebar

Related Questions

I am to consume a certain web service that the server guys have developed
is it possible to consume web service (written in c#, ... I don't have
This is how I have currently managed to consume a particular Microsoft web service.
I have to consume a .NET hosted web service from a Java application. Interoperability
I have a Spring application that uses JAX-WS to consume another web service. Everything
With Java it is easy to consume a Web Service over HTTPS but how
I have developed a client application to consume a web service, there are no
I have a JAX-RPC web service that I am attempting to consume using Spring.
I want to consume WCF web service from Android application. I have worked on
So this is my situation. I have to consume a third party web service

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.