Несколько конечных точек под IIS

Я пытался добавить новую конечную точку в службу, размещенную в IIS, но не смог выяснить это за последний день или около того.

Это мое понимание

you can have multiple endpoints under IIS as long as they have unique addresses. you could assign a base address but it will be overridden by the virtual directory setup in IIS.

Мой виртуальный каталогHTTP: // локальный / WcfCert /

<services>
  <service name="WcfCertServer.Service1" behaviorConfiguration="WcfCertServer.Service1Behavior">
    <endpoint address="" binding="wsHttpBinding" contract="WcfCertServer.IService1"/>
    <endpoint address="test" binding="wsHttpBinding" contract="WcfCertServer.IService1"/>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
  </service>
</services>

Я могу вызвать сервис, используяHttp: //localhost/wcfcert/service1.svc

ноHttp: //localhost/wcfcert/test/service1.svc/test ничего не возвращает в IE или в клиентском приложении

что мне здесь не хватает?

Edit:

Итак, я провел дальнейшее тестирование, и вот что я обнаружил.

если я запускаю WcfTestClient.exe и добавляюHTTP: // локальный: 1523 / Service1.svc или жеHTTP: // локальный: 1523 / Service1.svc / MEX он добавит обе конечные точки под этим адресом. так что вот мой вопрос не долженHTTP: // локальный: 1523 / Service1.svc представлять только первую конечную точку? почему при добавлении этого адреса появляются обе конечные точки?

но если я попытаюсь добавитьHTTP: // локальный: 1523 / Service1.svc / тест я получил

Error: Cannot obtain Metadata from http://localhost:1523/Service1.svc/test If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: http://localhost:1523/Service1.svc/test Metadata contains a reference that cannot be resolved: 'http://localhost:1523/Service1.svc/test'. Sendera:BadContextTokenThe message could not be processed. This is most likely because the action 'http://schemas.xmlsoap.org/ws/2004/09/transfer/Get' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding.HTTP GET Error URI: http://localhost:1523/Service1.svc/test There was an error downloading 'http://localhost:1523/Service1.svc/test'. The request failed with HTTP status 400: Bad Request.

Ответы на вопрос(2)

Ваш ответ на вопрос