er, I've cured this. For those curious to know what was going on, it was this.
I have created an asp.net page for use with Sharepoint which shows the contents of the folder of a path passed as a parameter and automatically creates links to those documents. This means that an existing network drive share is used rather than documents uploaded in Sharepoint.
I was using a test account in the web.config which had access rights to the test folder. Unfortunately I left authorization to this account on. Sharepoint then uses this account as the logged in user when a web application is that uses this web.config is opened.
BobC