Results 1 to 2 of 2

Thread: WCF Web Service - getting it started

  1. #1

    Thread Starter
    Hyperactive Member mulhearn22's Avatar
    Join Date
    Jun 2007
    Location
    Cherry Hill, NJ
    Posts
    347

    WCF Web Service - getting it started

    Hi,

    I've recently been tasked with making a web service. I'm used to the asmx from 2.0 and found that in 4.0 that has been replaced by WCF. So, I went ahead and created the project and didn't change anything. I took a desktop app and added the unchanged WCF service as a reference, which kicked the service on. I then used the following code to access the service and just retrieve the default StringValue property, which should return "Hello!", but it returns a null. I've looked EVERYWHERE for a simple, quick tutorial but apparently all people want to know is how to run it on IIS7. Can someone help me out?

    My code from the desktop app:

    Code:
    using (ServiceHost host = new ServiceHost(typeof(ServiceReference1.CompositeType)))
    {
        host.Open();
        ServiceReference1.CompositeType test = new ServiceReference1.CompositeType();
        MessageBox.Show(test.StringValue);
    }   //using
    TIA,
    Matt
    VS 2010 / .NET 4.0 / ASP.NET 4.0

  2. #2
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: WCF Web Service - getting it started

    How have you hosted the service in the IIS? Have you seen this site, which explains in detail.
    Post some service code....
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width