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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:53:22+00:00 2026-06-07T18:53:22+00:00

I am creating a Asp.net Webapi for our services . On the other hand

  • 0

I am creating a Asp.net Webapi for our services . On the other hand I have to pull some data from an existing WCF Service.

I am creating a web reference in my asp.net webapi project . But it seems there is no proxy generated.

I tried with VS 2012 RC and then with VS 2010. I can not reference it from my model/controller any where in the project. Is there a different way of creating proxy in MVC webapi. I dont know what is wrong.

Does it has to do something with like i can not consume a wcf service from a rest service

What is that i am missing here .

Thanks.

  • 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-07T18:53:26+00:00Added an answer on June 7, 2026 at 6:53 pm

    Try adding a service reference rather than a web referance, which is used for the deprecated ASP.NET web services (ASMX).

    I just tried this and it works as expected. Here is what I did:

    1. Created a new ASP.NET MVC 4 Web Application and selected the Web API project template.
    2. Added a WCF Service Application project to the solution. Remember to build this before adding a service reference to it.
    3. In the Web APi project, I added a service reference to the WCF service.
    4. Replaced the code in ValuesController.Get(int id) with

      public string Get(int id)
      {
          var serviceReference1 = new ServiceReference1.Service1Client();
          return serviceReference1.GetData(id);
      }
      

    When browsing

    http://localhost:<port>/api/values/2
    

    I receive

    <?xml version="1.0" encoding="utf-8"?><string>You entered: 2</string>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an asp.net app with just some lite data access from xml files.
I have a page where I am dynamically creating an asp.net table. At some
I'm creating an ASP.NET site where some pages need to have a div floated
I'm creating an ASP.NET web application to schedule tasks on our server from a
I am creating a ASP.Net Web API to expose an existing database for use
I am creating asp.net net app for a client and he likes to have
I am creating a asp.net mvc application and loaded the data into jqgrid and
I have repeatedly run in to a problem when creating ASP.NET MVC 3 controllers
I'm creating an ASP.NET web application that is to communicate with a WCF web
I'm creating an api using Asp.net web api. I have controller BookController with two

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.