Error: Could not find a base address that matches scheme https for the endpoint with binding WebHttpBinding. Registered base address schemes are [http].
I've searched other answers and tried out different things, but my web service still isn't working. Note: I am new at this, but have experience in dev/web service. I only need the service to run on HTTPS, btw.
Web.config:
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="bindingHTTPS" crossDomainScriptAccessEnabled="true">
<security mode="Transport">
<transport clientCredentialType="None"></transport>
</security>
</binding>
<binding name="httpbind" crossDomainScriptAccessEnabled="true"></binding>
</webHttpBinding>
</bindings>
<services>
<service name="Personnel.Personnel" behaviorConfiguration="personnelBehavior">
<endpoint address="" binding="webHttpBinding" bindingConfiguration="bindingHTTPS" contract="Personnel.IPersonnel" behaviorConfiguration="web"></endpoint>
<endpoint address="" binding="webHttpBinding" bindingConfiguration="httpbind" contract="Personnel.IPersonnel" behaviorConfiguration="web"></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="personnelBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
It worked fine until I added another method? So now I have two methods? in my web service:
[WebGet(UriTemplate="createOffboardTask/{resourceName}/{lastDay}/{submitter}",ResponseFormat=WebMessageFormat.Json, BodyStyle=WebMessageBodyStyle.Wrapped)]
public string createOffboardTask(string resourceName, string lastDay, string submitter)
{
//do some stuff
}
[WebGet(UriTemplate = "createOnboardTask/{resourceName}/{firstDay}/{submitter}/{itemID}", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)]
public string createOnboardTask(string resourceName, string firstDay, string submitter, string itemID)
{
//do some stuff
}
And I do have both operation contracts in the Ifile:
[OperationContract]
string createOffboardTask(string resourceName, string lastDay, string submitter);
[OperationContract]
string createOnboardTask(string resourceName, string firstDay, string submitter, string ID);