Last post Aug 16, 2013 12:18 PM by kushalrdalal
Aug 12, 2013 09:18 AM|.net_junkie|LINK
I am hosting a WCF service in IIS and i want to whether it is hosted in IIS or not.What errors i will get if it is not hosted and how to test the application?
Please dont post the links.
Aug 12, 2013 02:10 PM|sukumarraju|LINK
What errors i will get if it is not hosted
when the client sends a message to the WCF service that is NOT hosted/exists on web server , HTTP 404
Not Found is returned. NotFound indicates that the requested resource does not exist on the server.
how to test the application?
Send a request to the web service where it is expected to receive HTTP status code 404.
public class HttpResponseTests
private HttpClient client;
private HttpResponseMessage response;
public void SetUP()
client = new HttpClient();
//get the service URI from configuration file
client.BaseAddress = new Uri(ConfigurationManager.AppSettings["serviceBaseUri"]);
response = client.GetAsync("contacts/get").Result;
public void GetStatusCode()
Aug 16, 2013 12:18 PM|kushalrdalal|LINK
You can go to the iis and then see the hosted service over there.
When you have clicked the service on left pane and if you able to see the .svc file on right side.
Right click the .svc file and see in thr browser.
If you can able to see the service in the browser and you can click on the method and it should show you the wsdl file.
If this works then your service is hosted on iis and working.