According to the wisdom of the Internet, if I intend to host my site as something.azurewebsites.com (which is the case for me), the secure schema is already activated.
However, when I make a call to (1) below, I get 404 - resource cannot be found, while a call to (2) results in the expected behavior. The only difference between those lines is the security level for the protocol (copy-pasted it, twice!) so I question the provided link's truthfulness.
What can I do about it?!
However, I also noticed that:
gives me the usual site, so that might have to do with something in the method definition itself. It looks a bit like this.
namespace One-of-my
{
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode
= AspNetCompatibilityRequirementsMode.Allowed)]
public class SomeService
{
[OperationContract]
[WebGet(
UriTemplate = "Tester/{blopp}",
ResponseFormat = WebMessageFormat.Json)]
public async Task<String> Tester(String blopp) { ... }
}
}
My CONFIG looks as follows. First system.serviceModel.
<system.serviceModel>
<services>
<service name="MySite.MyService">
<endpoint address=""
behaviorConfiguration="MySite.MyServiceAspNetAjaxBehavior"
binding="webHttpBinding"
contract="MySite.MyService" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="MySite.MyServiceAspNetAjaxBehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata
httpGetEnabled="true"
httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
</system.serviceModel>
And here, system.webServer.
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add
name="Access-Control-Allow-Methods"
value="GET,POST,DELETE,HEAD,PUT,OPTIONS" />
<add
name="Access-Control-Allow-Headers"
value="X-Olaround-Debug-Mode, Authorization, Accept" />
<add
name="Access-Control-Expose-Headers"
value="X-Olaround-Debug-Mode, X-Olaround-Request-Start-Timestamp,
X-Olaround-Request-End-Timestamp, X-Olaround-Request-Time,
X-Olaround-Request-Method, X-Olaround-Request-Result,
X-Olaround-Request-Endpoint" />
</customHeaders>
</httpProtocol>
<modules runAllManagedModulesForAllRequests="true"/>
<directoryBrowse enabled="true"/>
</system.webServer>