I have a WCF service in a shared environment that contains two different methods. One returns the desired result, and the other eliminates the exception of the endpoint, which is my main method of user authentication.
The script is shown here:
My Iservice.cs as below
[OperationContract]
[WebInvoke(Method="GET", UriTemplate = "Data?Id={id}", ResponseFormat=WebMessageFormat.Json)]
string GetData(string id);
[OperationContract]
[WebInvoke(Method = "GET", UriTemplate = "Login?InstId={inst}&UserId={user}&pwd={pwd}", ResponseFormat = WebMessageFormat.Json)]
string Authenticate(string inst, string user, string pwd);
which then authenticates the user data through the DAL, which works fine. My web configuration is as follows:
<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="True">
</serviceHostingEnvironment>
<services>
<service name="WCFDemo.Service1">
<endpoint address="http://www.ekotri.com/Service1.svc" behaviorConfiguration="restfulBehavior"
binding="webHttpBinding" listenUri="/" bindingConfiguration="" contract="WCFDemo.IService1">
</endpoint>
<host>
<baseAddresses>
<add baseAddress="http://www.ekotri.com" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="restfulBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="restfulBehavior">
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
GetData is working fine, but Authenticate gives the endpoint an undetected error. However, it works fine on local IIS.
source
share