я создал службу WCF, вот это раздел конфигурации:службы WCF: Невозможно вызвать методы через конечную точку в «WebHttpBinding»
<system.serviceModel>
<services>
<service name="McActivationApp.EnrollmentService" behaviorConfiguration="McActivationApp.EnrollmentServicBehavior">
<endpoint address="" binding="webHttpBinding" contract="McActivationApp.IEnrollmentService"/>
<endpoint address="mex" binding="mexHttpBinding" contract="McActivationApp.IEnrollmentService" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="McActivationApp.EnrollmentServicBehavior">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
Я подключен к услуге с WcfTestClient, добавила службу и может позвонить только те методы, которые находятся в разделе «IEnrollmentService (MetadataExchangeHttpBinding_IEnrollmentService)» (они работают так, как ожидалось).
Но методы из другого раздела «IEnrollmentService (WebHttpBinding_IEnrollmentService)» не подлежат вызову. Когда я пытаюсь вызвать любой из них я получил следующее сообщение об ошибке:
Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service.
Сведения об ошибке:
The Address property on ChannelFactory.Endpoint was null. The ChannelFactory's Endpoint must have a valid Address specified.
at System.ServiceModel.ChannelFactory.CreateEndpointAddress(ServiceEndpoint endpoint)
at System.ServiceModel.ChannelFactory`1.CreateChannel()
at System.ServiceModel.ClientBase`1.CreateChannel()
at System.ServiceModel.ClientBase`1.CreateChannelInternal()
at System.ServiceModel.ClientBase`1.get_Channel()
at EnrollmentServiceClient.UpdateEnrollmentProfile(String enrollmentId, String siteName, String deployServerName, Int32 methodId, String deviceClass, String deviceName, String registrationCode)
Вопрос 1: Могу ли я правильно понимаю, что для случая «IEnrollmentService (WebHttpBinding_IEnrollmentService) "методы вызова мне нужно дополнительно указать некоторую конечную точку?
Вопрос 2: Могу ли я получить работоспособность, что вообще?
Вопрос 3: Должен ли я заботиться о них (так как я могу вызвать методы из своего «пользовательского» приложения)?
Полезно знать. Благодарю. – Budda