-
Feb 17th, 2011, 09:22 AM
#1
Thread Starter
Hyperactive Member
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
-
Feb 17th, 2011, 03:23 PM
#2
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....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|