2012-02-09 12 views
0

Localhostで完全に機能するWCFファイルサーバーとクライアントがありますが、別のコンピュータにサーバーをインストールすると、ファイルをアップロードするときにクライアントが例外を発生させます。例外は次のとおりです。WCF FileServerのエンドポイント

サーバーは資格情報を拒否します。

クライアントの設定ファイルに新しいサーバーのIP(172.18.20.25)を追加します。

これは私のクライアントの設定ファイルである:

<?xml version="1.0"?> 
<configuration> 
<system.serviceModel> 
    <client> 
     <endpoint name="FileRepositoryService" 
    address="net.tcp://172.18.20.25:5000" binding="netTcpBinding" 
    contract="FileServer.Services.IFileRepositoryService" 
    bindingConfiguration="customTcpBinding"/> 
    </client> 

    <bindings> 
     <netTcpBinding> 
      <binding name="customTcpBinding" 
    maxReceivedMessageSize="2147483648" transferMode="Streamed"/> 
     </netTcpBinding> 
    </bindings> 
</system.serviceModel> 
<startup> 
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> 
</startup> 
</configuration> 

そして、これは私のサーバーの設定です:

<?xml version="1.0"?> 
<configuration> 
<startup> 
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> 
</startup> 
<appSettings> 
    <add key="RepositoryDirectory" value="storage"/> 
</appSettings> 
<system.serviceModel> 
    <services> 
     <service name="FileServer.Services.FileRepositoryService"> 
      <endpoint name="" binding="netTcpBinding" 
       address="net.tcp://localhost:5000" 
      contract="FileServer.Services.IFileRepositoryService" 
       bindingConfiguration="customTcpBinding" /> 
     </service> 
    </services> 
    <bindings> 
     <netTcpBinding> 
      <binding name="customTcpBinding" transferMode="Streamed" 
maxReceivedMessageSize="2147483648" /> 
     </netTcpBinding> 
    </bindings> 
</system.serviceModel> 
</configuration> 

クライアントとサーバは、それがうまく働いた単一のマシン上で実行されている場合前に述べたように。新しいWSDLエンドポイントをサーバーに追加する方法については読んでいますが、わかりませんし、追加方法もわかりません。あなたの提案は何ですか?

+0

あなたはセキュリティのために、Windowsのユーザーアカウントを使用して、基本的な 'netTcpBinding'たデフォルトを使用している設定してみてください。したがって、「新しい」クライアントと「新しい」サーバーが同じWindowsドメインに属していない場合、またはクライアントのPCがそのWindowsドメインにないアカウントで実行されている場合、機能しません。 –

+1

[プログラミングWCFセキュリティ](http://msdn.microsoft.com/en-us/library/ms731925.aspx)を参照し、サービスに最適なセットアップを確認してください –

答えて

0

所有しているアプリケーションがサーバー上で\書き込みアクセス権を持っているかどうかを確認してください。

+0

どこで確認できますか? – Saeid

0

このライン

address="net.tcp://localhost:5000" 

net.tcp://172.18.20.25:5000 

と試してみるに変更し、それを。

もう一つの提案、あなたのnet.tcp認証設定

関連する問題