locked
Call Https RESTful service RRS feed

  • Question

  • User2043281626 posted

    Hello,

    I created a RESTful service using C# .net and I published it out to a server to run. I am able to get the wsdl and view the methods on the service, however, when I attempt to use a web request; e.g. (HttpWebRequest)WebRequest.Create("RESTfullURL"), I get a 404 error.

    Any clues on how to properly get this job done?

    Monday, July 20, 2015 4:22 PM

Answers

  • User438962230 posted

    Hi noobville,

    It seems that you built your RESTFul service with some other technologies other than ASP.NET Web Api. Assuming your RESTful service is a WCF application, to consume this service you need to use svcutil.exe to generate the client class based on the service WSDL. Or use the "Add Service Reference" feature provided by Visual Studio IDE. See details in this article:

    Building and Testing WCF RESTful services

    To build a RESTFul service by using Web Api, you can follow the steps in this tutorial:

    Build RESTful API's with ASP.NET Web API

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 21, 2015 9:31 AM