First off, I'd like to thank those who have helped me out with this WCF connectivity, as it's fairly new to me.
I've got a hosted WCF service that I created a custom factory for, so that this would work with multiple host headers:
/// <summary>
/// Required for hosting where multiple host headers are present
/// </summary>
public class MultipleHostServiceFactory : ServiceHostFactory
{
protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
{
List<Uri> addresses = new List<Uri>();
addresses.Add(baseAddresses[0]);
return base.CreateServiceHost(serviceType, addresses.ToArray());
}
}
I'm pretty sure that my config files are now right, on both client and server (can be seen here http://stackoverflow.com/questions/1794247/wcf-consumer-website-returning-the-address-property-on-channelfactory-endpoint-wa ).
The error I'm getting appears to be related to the factory:
Manual addressing is enabled on this factory, so all messages sent must be pre-addressed.
Line 113:
Line 114: public string GetData(int value) {
Line 115: return base.Channel.GetData(value);
Line 116: }
Line 117:
The error occurs at line 115.
Thanks.