问题
Trying to create an framework 4.0 WCF basicHttp service hosted by IIS (6) that is completely unauthenticated. Once deployed, I can successfully retrive the WSDL via a browser.
However whenever I try and connect to it via WCF Test Client or via a visual studio generated proxy, I'm getting "The server has rejected the client credentials.".
This still occurs when I add <security mode="None"/>
, but my understanding is that this is the default anyway ...
In the IIS virtual directory properties I only have anonymous ticked, and in the web.config file <authentication mode="None"/>
is set as well.
Any ideas?
回答1:
Seems like the IIS site has anonymous authentication disabled. Check out this article on IIS 6 anonymous access configuration.
回答2:
Turns out that the source of the exception was from an immediate attempt to connect to a downstream tcp service. As a workaround I ended up creating a plain jane webservice wrapper which successfully connects to the downstream service fine using a domain account specified in the <identity impersonate="true" userName=".." password=".." />
.
Note, I've added a related question asking why one works and the other doesn't.
来源:https://stackoverflow.com/questions/6197166/problems-connecting-to-a-basichttpbinding-endpoint-with-security-mode-none