Error when trying to add secured WMS layers to the map

Discussion created by gispro_moscow on Feb 20, 2012

I'm trying to add secured WMS layers from GeoServer to ArcMap.
I'm adding a WMS server in ArcCatalog with user and password specified and I get connected ok - I see the list of layers.
However, when I try to add any layer to the map in ArcMap, or preview with ArcCatalog, I get the following error:

The selected object failed to draw:
My WMS Service: WMS service exceptions:-Service Error
Service Error Description: Could not find layer myws:mylayer

This doesn't happen when I allow anonymous access for WMS service in GeoServer. I can add layers to the map and everything looks great.
But when I turn anonymous access off, ArcGIS fails to add layers to the map.
I have this problem with ArcGIS only. QGIS and uDig also ask for WMS user/password, and work fine after entering them.

Tried it on both ArcGIS 9.3.1 and ArcGIS 10. - Same problem.
Any clues?