サービスにアクセスするためにユーザー名とパスワードを持つ Web サービスをセットアップしようとしています。このリンクをガイドとして使用していますhttp://www.codeproject.com/Articles/642997/Generate-username-authentication-based-on-basicHtt
以下のエラーを回避できない領域に到達しました。以下の私の設定では、このエラーメッセージを受け取りました
ホスト ('Anonymous') で構成された認証スキームは、バインディング 'BasicHttpBinding' ('Basic') で構成されたものを許可しません。SecurityMode が Transport または TransportCredentialOnly に設定されていることを確認してください。さらに、この問題は、IIS 管理ツール、ServiceHost.Authentication.AuthenticationSchemes プロパティ、アプリケーション構成ファイル内のエレメント、バインディングの ClientCredentialType プロパティの更新、または調整によって、このアプリケーションの認証スキームを変更することによって解決される場合があります。 HttpTransportBindingElement の AuthenticationScheme プロパティ。
私の設定ファイルは
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="customBehavior">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceCredentials>
<userNameAuthentication
userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="Project.Services.MyService, Project.Services"/>
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="MyBasicHttpBinding">
<security mode="Transport">
<transport clientCredentialType="Basic" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="customBehavior" name="Project.Services.MyService">
<endpoint address=""
binding="basicHttpBinding" bindingConfiguration="MyBasicHttpBinding"
contract="Project.Services.Interfaces.ITechnology">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost/Service/myService.svc" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
<appSettings>
<add key="userName" value="user1"/>
<add key="password" value="password"/>
</appSettings>
</configuration>
wcf サービスは、Windows Phone 8 アプリケーションで使用されます。エラーに関するいくつかの記事を読み、エンドポイント アドレスを "" に設定しましたが、何も機能していません。あまりにも多くの変更を加えていたため、間違った方向に進んでしまった可能性があるため、上記の構成に戻らなければなりませんでした。
このサービスは、私のローカル IIS (Win 8 64 ビット プロ + すべての更新プログラム) でホストされています。
誰でも助けてもらえますか?