Good afternoon,
I create a database and then add a WCF service but when I want to run my WCF I have this error "Service metadata may not be accessible".
The problem is that I follow the steps of another topic from this website in order to solve my error, but anyway there is still this restriction and I can't have access to my WCF.
Here is my Web config I tried to modify with the other topic about the same error but do you see any mistakes which can't make my WCF impossible to run ?
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="metadataBehavior">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="Service3.Service3" behaviorConfiguration="metadataBehavior">
<endpoint
address=""
binding="customBinding" bindingConfiguration="jsonpBinding"
contract="Service3.IService3"/>
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange"/>
</service>
</services>
</system.serviceModel>
I tried a lot of changes, like even if I put a localhost address in the first endpoint there is still this error when I run my WCF.
I tried to change the different binding too but nothing changes error still appears ... Need help please !
Thanks for your answers
Edit: I tried to make changes but the error is still here. Here my new Web config file:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="metadataBehavior">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="Service3.Service3" behaviorConfiguration="metadataBehavior">
<endpoint
address="http://localhost:7488/"
binding="basicHttpBinding"
contract="HostService.IService3" />
<endpoint
address=""
binding="customBinding" bindingConfiguration="jsonpBinding"
contract="Service3.IService3"/>
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange"/>
</service>
<host>
<baseAddresses>
<add baseAddress="http://localhost:7488/Service3.svc" />
</baseAddresses>
</host>
</services>
</system.serviceModel>