<<pre lang="C#">b></b>I wrote rest services using WCF services,It's working in Local machine and i can access rest services,but When i host into IIS,it's not displaying any services.
<b>Web.congig</b>
<system.serviceModel>
<services>
<service name="WCFService.RestService" behaviorConfiguration="serviceBehaviour">
<endpoint address="" binding="webHttpBinding" contract="WCFService.IRestService" behaviorConfiguration="web"></endpoint>
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="serviceBehaviour">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<b>ServiceContract</b>
[ServiceContract]
public interface ILoginService
{
[OperationContract]
[WebInvoke(Method = "GET",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "login/{userId},{password}")]
string CheckLogin(string userId, string password);
}
For Hosting into IIS,I refereed this website.
<a href="http://social.technet.microsoft.com/wiki/contents/articles/1265.hosting-a-wcf-rest-service-on-iis.aspx">TechNet Wiki</a>[<a href="http://social.technet.microsoft.com/wiki/contents/articles/1265.hosting-a-wcf-rest-service-on-iis.aspx" target="_blank" title="New Window">^</a>]
<a href="http://dotnetmentors.com/how-to-host-wcf-service-in-iis-7.aspx">How to host wcf service in IIS 7.0 or 7.5 : www.dotnetmentors.com</a>[<a href="http://dotnetmentors.com/how-to-host-wcf-service-in-iis-7
.aspx" target="_blank" title="New Window">^]