I have a WCF REST service that among others saves/deletes files and folders on the server. To be able to access data on the server I impersonate a user that has credential for writing/deleting from the servers hard-disk.
Things work alright until i want to do 2 DELETEs in a row. Meaning a call "foo.svc/bar/1" with DELETE method it works and if i call the same again or another DELETE method for ex. "foo.svc/bar/2" it doesn't work anymore and i get a response with code 401 - Unauthorized: Access is denied due to invalid credentials, which i find very strange and have no idea how to solve.
Any pointers are welcome.
cheers