My ASP.NET web site calls a .net service from a code in App_Code to retrieve some information.
The web service is hosted at http://mydomain/ws/DirectoryService
http://mydomain/ws/DirectoryService
Problem solved. It turned out that I needed to Edit an anonymous authentication settings, so that when used (in my case it is always), the code would go under application pool's identity, and not IUSR: