I am having a very basic problem with creating WCF. So here is what i did
Created an ASP.NET web site project in VS2008.
Created a WCF service application in the same solution. Added a new WCF service "WCFService1.svc" into this project.
3,. Changed the setting of the Web server from "Use Visual Studio Development Server" to "Use IIS local web server".
Clicked add "Service Reference" in ASP.net web site project and开发者_如何转开发 clicked discover to see the "WCFService1" service. Now when I try to add Service Reference, I get an error all the time saying "Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service."
But if I revert back to the "Use Visual Studio Development SErver" setting, things run fine.
Please tell me what is going on here. This is driving me nuts! Eventually the project needs to be deployed in IIS to I am surprised if no-one else cam across this problem.
The VS development server uses Anonymous Authentication by default. If you change the authentication in the Options of the virtual directory it would work.
Here I found some links that might help you.
精彩评论