Hello colleagues. I have wcf iis hosted service. I've created standard(from vs template) wcf service and its client. At client I add ServiceReference to my wcf service. All is good. No errors, web-form for this server works too. Next step I publish my wcf service to Win2003 IIS6.0. I successfully go to http://server:1234/Service1.svc, see web-form, can check wsdl. But when i run: svcutil.exe http://server:1234/Service1.svc?wsdl or add service reference I've got errors:
Error: Cannot obtain Metadata from http://server:1234/Service1.svc?wsdl
If this is a Windows (R) Communication Foundation service to which you have acce
ss, please check that you have enabled metadata publishing at the specified addr
ess. For help enabling metadata publishing, please refer to the MSDN documentat
ion at http://go.microsoft.com/fwlink/?LinkId=65455.
WS-Metadata Exchange Error URI: http://server:1234/Service1.svc?wsdl
Metadata contains a reference that cannot be resolved:
'http://server:1234/Service1.svc?wsdl'.
The remote server returned an unexpected response: (417) Expectation failed.
The remote server returned an error: (417) Expectation failed.
At my service config I have:
endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
serviceMetadata httpGetEnabled="true"/>
I can't understand problems. Can you help me. Thanks a lot