I have a web part which I am trying to target to a specific audience (the 'Staff' audience.)
I have the web part in the home page of a site that has anonymous access enabled.
I have set the Target Audience of the webpart to 'Staff'. The idea is that anonymous viewers can't see the web part, but logged-in members of staff can see the webpart.
This works fine, as long as I am browsing the site from the server on which SharePoint is running, using the internal domain name (e.g. http://localhost:5050/site). If I view the site home page while not logged in, I can't see the webpart -- this is the correct behaviour.
However, if I view the site via the public address (e.g. http://www.realaddress.co.uk:5050/site) while not logged in, I can see the webpart. (I shouldn't be able to -- it's only targeted at the 'Staff' audience'.) This happens if I'm browsing either on the SharePoint server or a remote machine.
I'm a bit baffled!