Expand my Community achievements bar.

SOLVED

Anonymous access not allowed by configuration - requesting credentials

Avatar

Level 4

So I'm getting this error org.apache.sling.auth.core.impl.SlingAuthenticator getAnonymousResolver: Anonymous access not allowed by configuration - requesting credentials whenever I try to invoke my servlet from DefaultHttpClient. Here is my code

 HttpPost post = new HttpPost("http://localhost:4502/bin/sitemap/demo"+"?rootPath="+"/content/geometrixx");
     @SuppressWarnings("deprecation")
    org.apache.http.impl.client.DefaultHttpClient client = new org.apache.http.impl.client.DefaultHttpClient();
     org.apache.http.HttpResponse response = null;

     response = client.execute(post);

I did exactly the same as suggested in helpx articles listed below but still not working.
https://helpx.adobe.com/experience-manager/using/post_files.html

https://helpx.adobe.com/experience-manager/using/multiple-digital-assets.html

Please help.

1 Accepted Solution

Avatar

Correct answer by
Level 9
2 Replies

Avatar

Correct answer by
Level 9

Hi Vitis,

Add "/bin/sitemap/demo" in authentication requirement at http://host:port/system/console/configMgr/org.apache.sling.engine.impl.auth.SlingAuthenticator

Thanks,