web-dev-qa-db-ja.com

スキームnet.tcpに一致するベースアドレスが見つかりませんでした

デュプレックスモードチャネルをセットアップしようとしているため、ファイル転送サービスをbasicHttpBindingからnetTcpBindingに移動しました。また、net.tcpポート共有サービスを開始しました。

私は現在開発中です。アプリを開発サーバーに移動するまで、xpボックスで自己ホストしています。したがって、現時点では、IISにアクセスできません。

サービスをそのように構成した後:

<service behaviorConfiguration="transferServiceBehavior" name="API.FileTransfer.FileTransferService">
        <endpoint name="MyFileTransferEP"
                  address  = ""
                  binding  = "netTcpBinding"
                  bindingConfiguration="MyFileTransferNetTcpEP"
                  behaviorConfiguration="NetTcpEPBehavior"
                  contract="API.FileTransfer.IFileTransferService" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
        <Host>
          <baseAddresses>
            <add baseAddress="net.tcp://localhost:8001/project/filetransfer.svc" />
          </baseAddresses>
        </Host>
</service>

そして、そのような私のバインディング:

<netTcpBinding>
        <binding name="MyFileTransferNetTcpEP"
                 hostNameComparisonMode="StrongWildcard"
                 closeTimeout="00:01:00"
                 openTimeout="00:01:00" 
                 receiveTimeout="00:10:00" 
                 sendTimeout="00:01:00"
                 maxReceivedMessageSize="2147483647"
                 transferMode="Streamed"
                 portSharingEnabled="true">
          <security mode="None">
            <transport clientCredentialType="None" />
            <message clientCredentialType="None" />
          </security>
        </binding>
</netTcpBinding>

SVCファイルを右クリックすると、次のエラーが表示されます。

NetTcpBindingがバインドされているエンドポイントのスキームnet.tcpに一致するベースアドレスが見つかりませんでした。登録済みのベースアドレススキームは[http]です。

オンラインで読むと、この問題を解決するために、IISのアプリケーションのバインディングにnet.tcpバインディングを追加する必要があることが示唆されています。しかし、セルフホスティングでIISにアクセスできない場合はどうすればよいですか?ところで、これを読んでいて、IISを「持っている」場合は、次の手順を実行します。IIS-> Manage application-> Advanced settings。]の仮想ディレクトリ/アプリケーションを右クリックします。 [有効なプロトコル]の部分に、net.tcpを追加します。

何か案は?


更新:動作していたと思いましたが、まだ動作していません。ここに私が今持っているものがあります:私はまだ「スキームnet.tcpに一致するベースアドレスが見つかりませんでした」というエラーを受け取っています。あなたの提案を反映するために、すべてのベースアドレスを変更しました。私が今持っているものは次のとおりです。

<service behaviorConfiguration="transferServiceBehavior" name="API.FileTransfer.FileTransferService">
            <endpoint name="MyJSONFileTransferEP"
                      address="json"
                      binding="webHttpBinding"
                      bindingConfiguration="jsonWeb"
                      behaviorConfiguration="WebHttpEPBehavior"
                      contract="API.FileTransfer.IJSONFileTransferService" />
            <endpoint name="MyPOXFileTransferEP"
                      address="pox"
                      behaviorConfiguration="WebHttpEPBehavior"
                      binding="webHttpBinding"
                      bindingConfiguration="poxWeb"
                      contract="API.FileTransfer.IPOXFileTransferService" />
            <endpoint name="MySOAPFileTransferEP"
                      address="filetransfer"
                      binding="netTcpBinding"
                      bindingConfiguration="netTcpWeb"
                      behaviorConfiguration="NetTcpEPBehavior"
                      contract="API.FileTransfer.ISOAPFileTransferService" />
            <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange"/>
            <Host>
              <baseAddresses>
                <add baseAddress="net.tcp://localhost:2544/filetransfer/" />
              </baseAddresses>
            </Host>
          </service>

「net.tcp:// localhost:2544」と「net.tcp:// localhost:8001」の両方でこれを試しました。ファイアウォール設定に何かを追加(許可)する必要がありますか?他の提案はありますか?

App.configファイルにあるfiletransferserviceのmexTcpBindingは次のとおりです。

<endpoint address="net.tcp://localhost:2544/filetransfer/mex"
        binding="mexTcpBinding" bindingConfiguration="" contract="IMetadataExchange"
        name="filetransfermex">
        <identity>
          <certificateReference storeName="My" storeLocation="LocalMachine"
            x509FindType="FindBySubjectDistinguishedName" />
        </identity>
      </endpoint>

WebアプリでFileTransferServiceClientを参照できません。

再度、感謝します。

30
Peter

サービスに対してベースアドレスwholeアドレスではなく)のみを定義し、残りをサービスエンドポイントで定義する必要があります。 filetransfer.svcファイルの最後にあるアドレスは、有効なベースアドレスではありません(実際にはファイルアドレスです)

<service behaviorConfiguration="transferServiceBehavior" 
         name="API.FileTransfer.FileTransferService">
    <Host>
      <baseAddresses>
        <add baseAddress="net.tcp://localhost:8001/project/" />
      </baseAddresses>
    </Host>
    <endpoint name="MyFileTransferEP"
              address  = "filetransfer"
              binding  = "netTcpBinding"
              bindingConfiguration="MyFileTransferNetTcpEP"
              behaviorConfiguration="NetTcpEPBehavior"
              contract="API.FileTransfer.IFileTransferService" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>

これにより、セルフホスティングを使用すると、完全なアドレスでサービスを利用できます。

net.tcp://localhost:8001/project/filetransfer

これはnet.tcpであり、セルフホスティングであるため、svcファイルはまったく必要ありません。

PDATE: net.TCPベースアドレスのメタデータを取得できるようにするには、<service>セクション内で次のようなnet.Tcp MEXエンドポイントを公開する必要があります。

        <endpoint name="NetTcpMEX"
                  address="netTcpMex"
                  binding="mexTcpBinding"
                  contract="IMetadataExchange" />
24
marc_s

エラー(WCF):NetTcpBindingがバインドされているエンドポイントのスキームnet.tcpに一致するベースアドレスが見つかりませんでした。登録済みのベースアドレススキームは[http]です。

ステップ1:WAS(Windowsプロセスアクティブ化サービス)またはHTTP以外のプロトコルのサポートは、次のプラットフォームでのみサポートされています。•Windows Vista•Windows 7•Windows Server 2008

  1. Windowsの機能の有効化または無効化に進みます
  2. Microsoft .NET Framework 3.5に移動します
  3. Windows Communication Foundation HTTPアクティベーションを確認する
  4. Windows Communication Foundationの非HTTPアクティベーションを確認する

ステップ2:IIS> WCF Host Web Site> Manage Application> advanced Settings> Enabled Protocols> Set the value to HTTP、NET.TCP

39

IIS=>仮想ディレクトリ/アプリケーションの選択=>詳細設定=>プロトコルの有効化。たとえばhttp、net.tcp。(スペースプロトコルテキスト間

これはhttp、net.tcpである必要があります(つまり、プロトコルテキストの間にスペースがない)

16
dotnetmem

将来の読者のために。

IIS-Expressを使用していることを確認してくださいnot

これが私の「落とし穴」でした。

参照:

http://www.iis.net/learn/extensions/introduction-to-iis-express/iis-express-faq

        Q: Does IIS Express support non-HTTP protocols such as net.tcp or MSMQ?
        A: No. IIS Express only supports HTTP and HTTPS as its protocol.

これは、Visual Studioのプロパティであり、web.csproj(または同様の)プロパティと「Web」左タブです。 「Use IIS Express」というチェックボックスがあります。チェックを外します。

それを行った後でも、IIS(7)と "http、net.tcp"に移動して、 "Enabled Protocols"を取得する必要があります(他の回答で説明されています)。

また、名前付きパイプ固有のエラーが発生している場合。

バインディングNetNamedPipeBindingを持つエンドポイントのスキームnet.pipeに一致するベースアドレスが見つかりませんでした。

次に、「net.pipe」をリストに追加する必要があります。

例:

http、net.tcp、net.pipe

名前付きパイプ固有のエラーについては、以下も参照してください。

IIS7でホストされる名前付きパイプとしてWCFを構成

また、これらの対応するWindowsサービス(名前付きパイプまたはtcpまたは両方)を確認してください

(名前付きパイプWindowsサービス)

NetPipeActivator

Net.Pipe Listener Adapter

Receives activation requests over the net.pipe protocol and passes them to the Windows Process Activation Service.

(tcp windowsサービス)

NetTcpActivator

Net.Tcp Listener Adapter

Receives activation requests over the net.tcp protocol and passes them to the Windows Process Activation Service.
8
granadaCoder

多くの解決策を経た後..で、最終的な解決策を見つけました ブログ ..しかし、私は説明しますここでの手順全体は、以下の手順に従う必要があります..

Step1:(Windows Process Activation Service)または非HTTPプロトコルのサポートは、次のプラットフォームでのみサポートされます。•Windows Vista•Windows 7•Windows Server 2008

  • Windowsの機能の有効化または無効化に進みます
  • Microsoft .NET Framework 3.5に移動します
  • Windows Communication Foundation HTTPアクティベーションを確認する
  • Windows Communication Foundationの非HTTPアクティベーションを確認する

ステップ2:IIS> WCF Host Web Site> Manage Application> advanced Settings> Enabled Protocols> Set the value to http、net.tcp

ステップ2の完了後に問題が解決したかどうかを確認します。そうでない場合は、以下の手順に従ってください

ステップ3:administrator-level Command Prompt window、次のコマンドを実行します。

%windir%\system32\inetsrv\appcmd.exe set site "Default Web Site" -+bindings.[protocol='net.tcp',bindingInformation='8082:*']

IISを1回再起動するか、Failed to map the path '/'今すぐ例外

事前設定されたアプリケーションは、以下のようになります

enter image description here

6
Moumit

コントロールパネル->プログラム->ウィンドウのオン/オフを切り替える->機能->機能の追加-> .net framework *機能-> Wcfアクティベーション- >非HTTPアクティベーション。

4
Mukul Narad

Windows 10の場合
ステップ1:Windows機能の有効化と無効化> .Net Framework 4.6 Advanced Services> WCF Services> TCP Activation

ステップ2:IIS> WCF Host Web Site> Manage Application> advanced Settings> Enabled Protocols> Set the value to net.tcp、http

手順3:管理者権限でコマンドコンソールを開く> iisresetと入力

3
Benj

同じ問題(環境:Win7/IIS7.5 .NET4)があり、ディレクトリ "c:\ Windows\System32\inetsrv"から利用可能なappcmd.exeを介してバインディングを構成することで解決しました。

"appcmd.exe set pp" WebsiteName/applicationName "/enabledProtocols:http,net.tcp"

注:IIS構成は階層的であるため、他のアプリケーションでの不要な変更/セキュリティ問題を回避するために、可能な限り低いレベルで構成を変更する必要があります。

次のリンクが役立つ場合があります。 http://msdn.Microsoft.com/en-us/library/ms788757.aspxhttp://support.Microsoft.com/kb/2803161

このヘルプアルバートを願っています

1
Albert

Windows 7でも同じエラーが発生したため、IISを開き、アプリケーションを保持しているWebサイトを右クリックして[バインドの編集...]を選択して修正しました。ここにnet.tcpバインディングを追加し、問題を解決しました。

サイトバインディングPrintScreen

0
Paul Cenan