none
Add New WCF Service RRS feed

  • Pergunta

  • Estou trabalhando com o clearUsernameBinding (http://webservices20.blogspot.com.br/2008/11/introducing-wcf-clearusernamebinding.html) esta funcionando bem, porém sempre que vou criar um novo WCF Service no projeto da o erro que mostra na imagem

    Erro

    mas se eu copiar e colar um que já existe no projeto não tenho problemas, só me da esse erro quando tem dar um Add New Item.

    aqui esta meu web.config

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <configSections>
            <section name="clearUsernameBinding" type="WebServices20.BindingExtenions.ClearUsernameCollectionElement, ClearUsernameBinding, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" requirePermission="false"/>
        </configSections>
        <appSettings>
            
        </appSettings>
        <connectionStrings>
            
        </connectionStrings>
        <system.web>
            <compilation debug="true" targetFramework="4.0" />
        </system.web>
        <system.serviceModel>
            <extensions>
                <bindingExtensions>
                    <add name="clearUsernameBinding" type="WebServices20.BindingExtenions.ClearUsernameCollectionElement, ClearUsernameBinding, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
                </bindingExtensions>
            </extensions>
            <bindings>
                <clearUsernameBinding>
                    <binding name="myClearUsernameBinding" messageVersion="Soap12"/>
                </clearUsernameBinding>
            </bindings>
            <services>
                <!--Adesoes-->
                <service behaviorConfiguration="SampleServiceBehaviour"
                         name="Syns.WcfServiceHost.Adesoes.AdesaoModalidadeService">
                    <endpoint binding="clearUsernameBinding"
                              bindingConfiguration="myClearUsernameBinding"
                              contract="Syns.WcfServiceHost.Adesoes.IAdesaoModalidadeService" />
                </service>
                <service behaviorConfiguration="SampleServiceBehaviour"
                         name="Syns.WcfServiceHost.Adesoes.AdesaoTipoService">
                    <endpoint binding="clearUsernameBinding"
                              bindingConfiguration="myClearUsernameBinding"
                              contract="Syns.WcfServiceHost.Adesoes.IAdesaoTipoService" />
                </service>            
            </services>
            <behaviors>
                <serviceBehaviors>
                    <behavior name="SampleServiceBehaviour">
                        <serviceMetadata httpGetEnabled="true" />
                        <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
                        <serviceCredentials>
                            <userNameAuthentication userNamePasswordValidationMode="Custom"
                                customUserNamePasswordValidatorType="WebServices20.Validators.MyUserNameValidator, MyUserNameValidator" />
                        </serviceCredentials>
                    </behavior>
                    <behavior name="">
                        <serviceMetadata httpGetEnabled="true" />
                        <serviceDebug includeExceptionDetailInFaults="false" />
                    </behavior>
                </serviceBehaviors>
            </behaviors>
            <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
        </system.serviceModel>
        <system.webServer>
            <modules runAllManagedModulesForAllRequests="true" />
        </system.webServer>
    </configuration>

    • Editado Pablotdv quinta-feira, 7 de fevereiro de 2013 12:11
    quinta-feira, 7 de fevereiro de 2013 12:09