我有一个WCF服务,该服务已通过VS 2017发布到Azure。我可以使用浏览器中的URL来访问该服务,并且它按预期方式工作。该服务侦听来自Salesforce的出站消息。如果我发送消息,它将返回404错误。该相同服务可以很好地发布到服务器上的IIS。 App Service中是否存在允许处理POST的设置?
更新:我认为问题可能出在web.config上,这是我拥有的:
<system.serviceModel>
<bindings />
<client />
<services>
<service name="WorkflowNotificationServices.CaseNotificationService" behaviorConfiguration="debug">
<endpoint binding="basicHttpBinding" contract="CaseNotificationService" />
</service>
<service name="WorkflowNotificationServices.CommentNotificationService" behaviorConfiguration="CommentNotificationServiceBehavior">
<endpoint binding="basicHttpBinding" contract="CommentNotificationService" />
</service>
<service name="WorkflowNotificationServices.TaskNotificationService" behaviorConfiguration="TaskNotificationServiceBehavior">
<endpoint binding="basicHttpBinding" contract="TaskNotificationService" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="CaseNotificationServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
</behavior>
<behavior name="CommentNotificationServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
</behavior>
<behavior name="TaskNotificationServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
</behavior>
<behavior name="debug">
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
这在带有IIS的VM上正常工作。