How to use a WCF service in IE?

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>
 
J

Joerg Jooss

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,
 
J

james

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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top