Reputation: 563
<system.serviceModel>
<services>
<service
name="myClass.IService1" behaviorConfiguration="myService">
<endpoint
name="ep1"
address="http://localhost:57582/Service1.svc"
contract="IService1"
binding="basicHttpBinding"
/>
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="myService">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
but still i am getting the following error:: Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata.
Upvotes: 0
Views: 116
Reputation: 6109
your service name IService1
- this looks like it might in fact be
the contract. If you are using the normal templates then remove the
I
from IService1
If you are IIS hosting you can remove the address
as the location of the .svc file is automatically the address.
The contract needs to be fully qualified including the namespace of the contract interface
with this in place your metadata should be served from <.svc file location>?wsdl
Upvotes: 1