Hi all,
I have the following problem. On my machine I have a SL 3 application, which basically consists of:
* Client app (SL)
* Web app (.Net 3.5)
* Communication with the database handled by WCF
The site is hosted on my IIS, with the following authentication set up:
* Anonymous access: off
* Basic authentication: on
* Integrated Windows authentication: on
My bindings are set up as follows:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IWcfPortal" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="TransportCredentialOnly" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost/MyApp/WCFPortal.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IWcfPortal" contract="WcfPortal.IWcfPortal"
name="BasicHttpBinding_IWcfPortal" />
</client>
</system.serviceModel>
</configuration>
Web.config:
<authentication mode="Windows" />
<identity impersonate="true" />
When I navigate to my site, I am prompted for an username and password. When filled in correctly, I can access the site but the db communication does not work. When I go to localhost/MyApp/WcfPortal.svc, I get the following error:
Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service.
I tried adding <transport clientCredentialType="Windows" />
to the security in the basicHttpBinding, but VS gives me the warning "The 'clientCredentialType' attribute is not declared.".
If anyone can help me with this, I would be very grateful.