ADFDI-00502: The client was unable to establish an unauthenticated session with the web application. What can be the reason?

I have experienced such error. The reason was, that web application didn't know, that servlet "adfdiRemoteServlet", responsible for Excel workbook connectivity, should be secured. Problem happens only when ADF security is set to "ADF Authentication and Authorization". This means, that ADF takes care not just for login, but for access to various resources (in our case it is adfdiRemoteServlet) as well. When security is set to "ADF Authentication", everything works fine without any additional configuration.
So what is the solution if You want to use ADF authentication and authorization as well? There is need to edit application web.xml file. You need to say, that adfdiRemoteServlet is also secured. To complete this, just append "security-constraint" XML element like this:


The line in bold is newly added. It is just additional URL pattern for adfdiRemoteServlet.
Thats it! It should work now.
This solution tested for ADF version


  1. I used this code, it works fine but it worked only one time, second on words its not working.


    1. Hi Kumar,
      What was an error for the second time? How did Your second try look like - You've just tried to open Excel workbook once again or after subsequent login experienced problems or something other?