You need to provide the endpoint address inside the
service
tag.
You can provide the absolute or relative Url.
But providing a relative Url is the best method, because when you host that in IIS, the absolute Url may change, but the relative will be the same and you don't need to change that again.
So, if the web.config and the service .svc file are at the same directory, then directly add the filename in the address like below.
<endpoint address="ServiceFile.svc" binding="wsHttpBinding" contract="WcfService1.IService1">
</endpoint>
So, you need to provide the correct relative address according of the Service file.
Let me know it works or not.
[Update]
1.
Include Service Behaviour
You have added Service like below in web.config.
<service name="samplewcf.Service1"
behaviorConfiguration="samplewcf.Service1Behavior">
But you have to forgot to include this behavior inside
serviceBehaviors
tags.
That is like below (Just add this name to the existing behavior)...
<serviceBehaviors>
<behavior name="samplewcf.Service1Behavior">
<serviceMetadata httpsGetEnabled="True" httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
2.
Typo mistake in endpoint binding
<service name="samplewcf.Service1"
behaviorConfiguration="samplewcf.Service1Behavior">
<endpoint address="ServiceFile.svc" binding="wsHttpBinding" contract="samplewcf.IService1">
</endpoint>
<endpoint address="Service1.svc" binding="wsHttpBinding" contract="samplewcf.IService1"/>
<endpoint address="mex" binding="mexHttspBinding" contract="IMetadataExchange"/>
</service>
This should be
mexHttpBinding
removing extra "s".
And keep only the required endpoint.
So, that will finally look like below.
<service name="samplewcf.Service1"
behaviorConfiguration="samplewcf.Service1Behavior">
</endpoint>
<endpoint address="Service1.svc" binding="wsHttpBinding" contract="samplewcf.IService1"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
Please correct your code as suggested, it should work fine. It is working fine at my end.
Let me know if you face issues again.
Note - I just resolved this issue, I have not checked the functionality of the Service functions. You need to check and test.
Thanks...