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

  • Home
  • SEARCH
  • 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 849151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:03:37+00:00 2026-05-15T07:03:37+00:00

I have created one WCF service , which is working fine, now i want

  • 0

I have created one WCF service , which is working fine, now i want to consume it in a client application.
using SVCutil.exe i have generated proxy and aap.settings for that service and added that to the client sln(console application)

But the problem is i am unable to access the wcf methods.

        using System.ServiceModel;

            namespace WCFClient
                    {
                     class Program
                     {
                     static void Main(string[] args)
                    {

                          Program p = new Program();
                         p. // not getting the wcf methods

                    }
                  }
                  }

what I am doing wrong?

  • 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-05-15T07:03:38+00:00Added an answer on May 15, 2026 at 7:03 am

    Depends on how your service is called. When you created the service reference, you gave it a namespace name – in that namespace, there should be a class called (yourservicename)Client – instantiante one of those and get going.

    You should find those files under the Service Reference – if you click on the “show all files” button in the Solution Explorer, you’ll start seeing a ton of files under your service reference – one in particular should be Reference.cs. Those classes are defined in that file – you can check it out, it’s a regular C# file.

    Update: If you create your proxy using svcutil.exe, depending on your options used with svcutil, you should also get a .cs file that contains the classes needed.

    svcutil http://yourserver/yourservice 
    

    would create a file called (your WSDL name).cs and an output.config in that directory where you run this command.

    You can also specify a file name for the C# file:

    svcutil http://yourserver/yourservice /out:MyService.cs
    

    and then your file is called MyService.cs.

    SvcUtil has a ton of options – can’t explain them all to you, play around with them, read up on the MSDN docs for it.

    Again, one of them will be called (your service name)Client. Include that *.cs file in your project, check the namespace, create an instance of the .....Client class and use it to call the WCF service.

    Example:

    • Grab info from URL

      svcutil http://www.ecubicle.net/iptocountry.asmx?wsdl /out:IP2CountryClient.cs
      
    • Include the resulting IP2CountryClient.cs in your project; by default, the classes in that file are in no particular namespace, so they’re globally visible

    • Instantiate the client class iptocountrySoapClient

      iptocountrySoapClient  client = new iptocountrySoapClient();
      
    • Call methods – e.g. this one here:

      string result = client.FindCountryAsString("82.82.82.82");
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an application which has a client (WPF) and the Server (WCF),
Background We have a C#/VB.net client application consuming a WCF service which connects to
I have created one WCF service, in which I am reading the msn whether
I have created a WCF Publish/Subscribe service using WSDualHTTPBinding. It allows a server application
I have created a WCF Data Service and using it in a web application
I have created one service in my grails application. in that service 25 methods
I created a simple WCF application which expose one operation. This operation takes a
I am developing a wcf service . I have created two dll's one for
Ok, i'm really lost on this one. I created a wcf service which i
We have an application in which we have created a service layer with most

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.