In our current project, we use web services extensively, and have built up all our external web service system communication using WSE2 and WS-Policy. Recently, on one individuals machine, they experienced the following error:
WSE453: an error was encountered loading or parsing the policy document in the following file "........\policycache.config"
A stack trace of te exception revealed an inner exception that stated:
"An entry with the same key already exists".
I tried for some time to fix this issue, and the same policy file was being used on a number of other developers machines (including my own) without issue. I tried many things, from using a different user to log on, shutting down a whole bunch of services on the machine, recopying over the policycache.config file and a bunch of others....
We finally found a solution, although I must admit I am at a loss to fully explain it. For the solution, read on:
Like most laptops, you can configure the ethernet port to AutoDetect the port speed. This laptop had the AutoDetect feature enabled, and was detecting the port at 100Mbs. Everybody elses laptop had the port speed set to 10Mbs because of previous network issues (unrelated and was time ago before this project) on the corporate network. When we set the port speed of this developers ethernet port to an explicit 10Mbs/Full Duplex, it worked!
Not really sure why, but can only guess that the parsing of the policycache file causes some network activity (whether it be a simple local lookup) or prior to sending of the message causes some network activity on the local machine, and the 100Mbs autodetect speed was causing this to fail, generating this error message. I would be happy to hear anyone elses thoughts. Googling this error doesn't produce much at all.
Maybe if Christian Weyer ever happens to read my blog, he can help me out.... :)