カスタム ID を持つアプリケーション プールを使用して、IIS 6 で実行されている WCF サーバーがあります。
現在、Web を 2 日間調べましたが、問題に対する正確な答えが見つかりません。私はそこに似たようなものがたくさんあることを知っています
IIS6 では、仮想ディレクトリで匿名アクセスが無効になり、統合 Windows 認証が有効になります。サービス アカウントは、マシンと同じドメインにあります。私はそれをsvcEと呼びます。IIS_WPG グループに svcE を追加しました。
ここで、最初の問題は、仮想ディレクトリで動作するように svcE を含むアプリケーション プールを選択し、それを appDir と呼ぶときです。その後、appDir に移動すると、資格情報の入力を求められますが、ネットワーク サービス アカウントを使用する場合は使用せず、自分が私としてログインしました。
私がやりたいことは、サービスをアカウント svE で実行することです。これは、データベースにアクセスできるため、その情報を WebConfig ファイルに入れずに行うためです。
構成ファイルを含む Web サービスがあります
<authentication mode="Windows"/>
<bindings>
<basicHttpBinding>
<binding name="default">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="default" contract="<removed>">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
サービスを使用する Web 構成には、
<basicHttpBinding>
<!-- Create one Binding for all three services, save space-->
<binding name="BasicHttpBinding_PricingService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" proxyCredentialType="Windows"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="<address>.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_PricingService"
contract="<contract>" name="<name>" />
最終的に私が達成しようとしているのは
Windows認証された人だけがサービスを呼び出すことができます->サービスはサービスアカウントを使用して、データベースとのすべてのやり取りを行います。
最初の部分をスキップしてannonアクセスを追加すると、それが機能し、データベースが正常に呼び出されることに注意してください
お手伝いありがとう