i have changed web.config , service working anonymous authentication. though when windows authentication enabled , anonymous authentication disabled in iis7.5, starts giving me following error. please help.
the authentication schemes configured on host ('integratedwindowsauthentication') not allow configured on binding 'basichttp' ('anonymous'). please ensure securitymode set transport or transportcredentialonly. additionally, may resolved changing authentication schemes application through iis management tool, through servicehost.authentication.authenticationschemes property, in application configuration file @ element, updating clientcredentialtype property on binding, or adjusting authenticationscheme property on httptransportbindingelement.
web.config follows:
<?xml version="1.0"?> <configuration> <appsettings> <add key="aspnet:usetaskfriendlysynchronizationcontext" value="true" /> </appsettings> <system.web> <compilation debug="true" targetframework="4.5" /> <httpruntime targetframework="4.5"/> </system.web> <system.servicemodel> <bindings> <webhttpbinding> <binding name="jsonbinding"></binding> </webhttpbinding> <basichttpbinding> <binding name="basichttp"> <security mode="transportcredentialonly"> <transport clientcredentialtype="windows"></transport> </security> </binding> </basichttpbinding> </bindings> <behaviors> <servicebehaviors> <behavior name="basicbehavior"> <servicemetadata httpgetenabled="true" httpsgetenabled="true"/> <servicedebug includeexceptiondetailinfaults="false"/> </behavior> </servicebehaviors> <endpointbehaviors> <behavior name="json"> <webhttp/> </behavior> </endpointbehaviors> </behaviors> <services> <service name="restwcfservice.calculationservice" behaviorconfiguration="basicbehavior"> <endpoint address="" binding="basichttpbinding" contract="restwcfservice.icalculatorservice" bindingname ="basichttp"></endpoint> <!-- <endpoint behaviorconfiguration="json" binding="webhttpbinding" bindingconfiguration="jsonbinding" contract="restwcfservice.icalculatorservice" name="jsonservice"></endpoint> --> </service> </services> <protocolmapping> <add binding="basichttpbinding" scheme="http"/> <add binding="basichttpsbinding" scheme="https" /> </protocolmapping> <servicehostingenvironment aspnetcompatibilityenabled="true" multiplesitebindingsenabled="true" /> </system.servicemodel> <system.webserver> <modules runallmanagedmodulesforallrequests="true"/> <!-- browse web app root directory during debugging, set value below true. set false before deployment avoid disclosing web app folder information. --> <directorybrowse enabled="true"/> </system.webserver> </configuration>
thanks in advance!!!
you not using basic http binding named basichttp
in endpoint. change attribute in endpoint bindingname="basichttp"
bindingconfiguration="basichttp"
.
by way have enable both anonymous authentication , windows authentication in iis.