0
votes

i have an service been hosted in iis 7, in windows7 when i type the url http://192.160.11.13/Employee/Service1.svc i can see the below information.

svcutil.exe http://192.160.11.13/Employee/Service1.svc?wsdl

This will generate a configuration file and a code file that contains the client class. Add the two files to your client application and use the generated client class to call the Service. For example:

C#

class Test
{
    static void Main()
    {
        Service1Client client = new Service1Client();

        // Use the 'client' variable to call operations on the service.

        // Always close the client.
        client.Close();
    }
}

when i type to get the wsdl http://192.160.11.13/Employee/Service1.svc?wsdl i am not getting the wsdl instead i am getting this error message HTTP Error 404. The requested resource is not found.

what i am missing here, please let me know so that i can generate the wsdl

Thanks Prince

1
Can you post your web.config and hosting code for the service?Jeff

1 Answers

1
votes

The error you are getting is http 404, which means "file not found".

There could be several reasons for this:

  • The service is not running
  • httpget is not allowed in the web.config
  • the mex endpoint is not set up in the web.config
  • you are not wusing the correct url

Before you use the svcutil make sure that you can access the wsdl file through the browser.