Hello all!
I am starting a new project using WCF so that I can use jQuery to make AJAX calls to the server. I have had all kinds of issues with configuring WCF in the past so I decided to do some new research to see if the level of documentation for WCF in VB had improved. Unfortunately WCF documentation to me is still as cloudly as when it was released as a CTP...
However I rediscovered the WebScriptServiceHostFactory and decided to give it a try. From what I gathered from several sources, I should be able to use the WebScriptServiceHostFactory in my .svc file and not have to worry about trying to go through the ABC's of WCF, (Pun intended).
I built a project that connects to a SQL Server and by way of LinqToSql and returns a dataset. I included the WebScriptServiceHostFactory and and also added the
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
to the web.config. But when I run it I get the dreaded "Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service" error message that plagued me so much when I first started to play with WCF.
I rewrote the function to just return a string instead of connecting to a database, etc, just to see if it would work, but I got the same thing.
So the question is, besides adding the factory to the .svc file and the previously mentioned serviceHostingEnviroment option to the web.config, what am I doing wrong???
I have tried checking & unchecking "Enable anonymous access" in the directory security tab in IIS as well. (I have Integrated Windows and Digest Windows Authentication checked).
As always, Thanks!!!