Hi Community,
I am seeing an issue where AEM custom sling servlet is not accessible on one of the Dispatcher servers (IIS 10).
On trying to access the servlet, I get this error:
I have added filter to allow the servlet path in dispatcher.any file.
/0116 { /type "allow" /method "GET" /url "/bin/nameofthepath*" }
The pages are loading fine, just the servlets are not working. Kindly let me know if I am missing out anything. Appreciate your support.
Please note: The custom sling servlet is working fine on publish instance.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
I have also provided all permissions for DefaultAppPool
Views
Replies
Total Likes
@SmrithiG1 Have you checked dispatcher log? Is your servlet path resolving to required farm file which contains the /allow filter you mentioned above?
Views
Replies
Total Likes
Hi @PavanGaddam ,
Yes I checked the dispatcher.log and the servlet path not shown in the logs at all.
I can see logs like request declined on trying to access the servlet.
But on the working Dispatcher server (another instance), I can see the request and the servlet path is resolving to required farm file.
Views
Replies
Total Likes
Try comparing the configuration files between the server where it is working and where it is not. Look at all the /deny rules in the /filter section.
Hi @SmrithiG1 ,
It looks like the issue may be related to the Dispatcher configuration. Here’s an additional step to check:
Also, could you confirm if other path based servlets are working fine on the same Dispatcher server? Just to make sure its not related to some typo in configuration.
Let me know if this helps!
Thanks
Ritesh Mittal
Views
Replies
Total Likes
1. I have cross checked the filter rules in dispatcher.any file. I have added 5 filter rules for five different custom servlet, all registered under /bin path. The difficulty that I am finding is that, the same dispatcher.any file is used on all other envs and multiple servers and they all seem to work fine.
2. I can see only debug and trace logs and there is no error log recorded.
3. All the other custom sling servlets are also not accessible and is throwing the same error.
Do you think this can be the issue with IIS installation on this server.
Can I try a reinstallation of IIS.
Views
Replies
Total Likes
Try below-
can you please let me know how to look for issues with request to access /bin path in IIS logs.
I have set up IIS logs.
These are the logs thats coming up there:
10.194.193.56, -, 3/13/2025, 9:12:17, W3SVC1, <Servername>, <ipaddress of the server>, 0, 768, 5009, 404, 2, GET, /bin/nameofthepath, tag=<nameofthetag>,
Views
Replies
Total Likes
I tried reinstalling IIS on windows and I still see the same error.
Steps followed.
1. Uninstalled IIS
2. Installed IIS
3. Added the script folder with all the config files and dispatcher.any file
4. configured handler mappings
5. the home page is loading fine like before and url rewrites are working but sling servlets are not for some reason.
Views
Replies
Total Likes
If other requests are going through the dispatcher then I think your iis configuration are correct. Try changing the dispatcher log level to trace and check what’s happening on the particular servlet request. Trace log level will trace everything for that request and will also logs what causing this request call to be blocked/denied
Hope this helps
Views
Replies
Total Likes
I tried my updating the log level to trace.
I believe the request is blocked, as I dont see any log info related to the servlet request.
All other pages are loading fine on dispatcher and URL rewrite rules are working too on the pages.
Just the sling servlets are not working.
Tried restarting IIS and cleared dispatcher cache too.
Views
Replies
Total Likes
With the log level as trace on dispatcher you can still see the entry for your request if it’s coming to dispatcher even if dispatcher filter rules block it. This lead me to conclude that you need to debug on IIS server. I believe somehow this server is blocking the request. Do you se the option to change the log level to trace or debug for your IIS server?
Views
Replies
Total Likes
Yes, I have updated the log level to trace, but i dont see the request reaching the logs.
I think so the request is not reaching dispatcher due to permission issue or some missing file like the error displayed on the screen.
I have cross checked the permissions, and DefaultAppPool has all the permissions for initpub/wwwroot folder.
Views
Replies
Total Likes
Hi @SmrithiG1 ,
You may check https://forums.ivanti.com/s/article/Issue-IIS-blocks-access-to-bin-folders-and-specific-extension-ty...
Or
Can you rewrite the path to /api/pathname instead of /bin just for testing purpose by allowing in Apache Sling Servlet/Script Resolver and Error Handler
Thanks
Views
Replies
Total Likes
HI @MukeshYadav_ , I did try the first option that you provided.
Its the same error still.
The second one I didnt try, as I already have another servlet which is not using /bin and it is also not working.
Views
Replies
Total Likes
Views
Likes
Replies