I came across the following error message recently whilst troubleshooting an SCCM Distribution Point;
There was an error while performing this operation.
Line number: <LineNumber>
Error: Cannot add duplicate collection entry of type ‘<XXX>‘ with unique key attribute ‘<YYY>‘ set to ‘<ZZZ>‘.
Client’s were downloading packages via SMB rather than over HTTP which prompted me to check if WebDAV had been configured… upon clicking on the WebDAV feature configuration page the error appeared.
Turns out this was quite a simple fix – WebDAV had been configured at the Server Level, rather than at the Site level which a) resulted in this error and b) seemingly broke WebDAV and was the cause of the issue with the DP. Simply delete the configuration at the Server Level, and set your configuration at the site level.