IISの下でホストされているサービスに新しいエンドポイントを追加しようとしていますが、過去1日ほどそれを把握することはできませんでした。IISの下に複数のエンドポイントがあります
これが私の理解です:
- あなたがいる限り、彼らは独自のアドレスを持っているとして、IISの下で複数のエンドポイントを持つことができます。
- ベースアドレスを割り当てることはできますが、IISの仮想ディレクトリの設定によって上書きされます。
私の仮想ディレクトリは、私がhttp://localhost/wcfcert/service1.svc
を使用してサービスを立ち上げることができますが、私は何をIEで何かまたはクライアントアプリ
をhttp://localhost/wcfcert/test/service1.svc/test返さないhttp://localhost/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>
ですここに行方不明?
編集:
は、だから私はさらにテストを行なったし、ここで私が発見したものです。
私がWcfTestClient.exeを起動し、http://localhost:1523/Service1.svcまたはhttp://localhost:1523/Service1.svc/mexを追加すると、そのアドレスの下に両方のエンドポイントが追加されます。だからここに私の質問http://localhost:1523/Service1.svc最初のエンドポイントを表すべきではないですか?そのアドレスを追加すると両方のエンドポイントが表示されるのはなぜですか?
が、私はhttp://localhost:1523/Service1.svc/testを追加しようとする場合、私はそれが実際だろう
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:BadContextToken
The 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.
を、私は同様の問題を抱えている私は取得してみたいですこれに対する解決策。あなたが描写しているものとの唯一の違いは、私はテキストなしの「400 Bad Request」を得ることができます。私はhttp://msdn.microsoftの説明に従っています。com/en-us/library/ms733766.aspxには、結果のURLがあなたの例に翻訳されているというコメントが記載されています - http://localhost/wcfcert/service1.svc/test。それは私にとってもうまくいかない。 –
URLはIE(.../Service1.svc/test)では機能しません。しかし、プロキシを作成することで、同じエンドポイントを追加することができます。これを参照してくださいhttp://msdn.microsoft.com/en-us/library/ms751515(v=vs.110).aspx –