How to use a WCF service in IE?

  • Thread starter Thread starter james
  • Start date Start date
J

james

Does anyone know how to access a WCF service in Internet Explorer? I
want to browse to my service to make sure it is returning good data,
and I think I am browsing to the wrong address.

I have a simple Interface
[ServiceContract]
interface IWebService
{
[OperationContract]
string Health();
}

and App.config
<configuration>
<system.serviceModel>
<services>
<service name = "HealthMonitor.WebService">
<endpoint
address = "http://localhost:80/"
binding = "basicHttpBinding"
bindingConfiguration = "NoSecurity"
contract = "HealthMonitor.IWebService"
/>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="NoSecurity">
<security mode="None"></security>
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>

And when I browse to http://localhost/Health I see
<s:Envelope>
<s:Body>
<s:Fault>
<faultcode>a:DestinationUnreachable</faultcode>
<faultstring xml:lang="en-US">
The message with To 'http://localhost/health' cannot be processed at
the receiver, due to an AddressFilter mismatch at the
EndpointDispatcher. Check that the sender and receiver's
EndpointAddresses agree.
</faultstring>
</s:Fault>
</s:Body>
</s:Envelope>
 
Thus wrote James,
Does anyone know how to access a WCF service in Internet Explorer? I
want to browse to my service to make sure it is returning good data,
and I think I am browsing to the wrong address.
[...]

You need either a client that is capable to produce SOAP requests, or use
a binding that processes raw HTTP queries. You don't get either out-of-the-box.


Cheers,
 
Thanks Joerg. Looks like msdn has an article on making a service like
this at http://msdn2.microsoft.com/en-us/library/aa395208.aspx.


Thus wrote James,
Does anyone know how to access a WCF service in Internet Explorer? I
want to browse to my service to make sure it is returning good data,
and I think I am browsing to the wrong address.

[...]

You need either a client that is capable to produce SOAP requests, or use
a binding that processes raw HTTP queries. You don't get either out-of-the-box.

Cheers,
 
Back
Top