0

I am using an external WSDL file for a WCF Service.

<wsdl:service n<wsdl:service name="CommonService"> <wsdl:port name="BasicHttpBinding_ICommonService" binding="tns:BasicHttpBinding_ICommonService"> <soap:address location="http://localhost:1371/CommonService.wsdl"/> </wsdl:port> </wsdl:service> 

When i add a service reference to this servie, i get an error in the client as Method Not Allowed.

But when i remove the above code from WSDL file and replace the same with this, it works fine. Whats the problem. Can anyone identify the reson behind this.

<wsdl:service name="CommonService"> <wsdl:port name="BasicHttpBinding_ICommonService" binding="tns:BasicHttpBinding_ICommonService"> <soap:address location="http://localhost:1371/Service.svc"/> </wsdl:port> </wsdl:service> 

1 Answer 1

3

I would think that it is the fact you don't expose a handler for .wsdl extension in IIS. Or you do not have a way to map that extension on. Usually, the wsdl in a WCF service is found at .svc?wsdl.

Sorry if I'm stating the obvious, but the reason looks to be changing the location from this:

http://localhost:1371/CommonService.wsdl

To this:

http://localhost:1371/Service.svc

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.