Cannot add duplicate collection entry of type 'add' with combined key attributes 'use

Posted by Vuyiswamb under Error and Solution on 9/10/2010 | Points: 10 | Views : 7985 | Status : [Member] [MVP] [Administrator] | Replies : 3

Good Day guys

I am seeing Fire with this error , i tried to Google and did my all but i failed to resolve it my self. i tried all the examples , used the remove on my web config to remove the so called duplicate key.

I am using IIS 7 on Windows Server 2008 and when i run my app , i get the following Error

http://www.vbforums.com/attachment.php?attachmentid=80224&stc=1&d=1284100071
and my webconfig looks like this

http://www.vbforums.com/attachment.php?attachmentid=80225&stc=1&d=1284100071

Thanks

Thank you for posting at Dotnetfunda
[Administrator]



Responses

Posted by: SheoNarayan on: 9/10/2010 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Your 2nd link is not correct perhaps as couldn't work for me. However by looking at the first error, it looks like you are not providing correct format of Forms Authentication allow and deny syntact.

Look at this article http://www.dotnetfunda.com/articles/article141.aspx that has the sample config file syntax for Forms Authentication

< system.web >

< authorization >
< allow roles = " User " />
< deny users = " * " />
</ authorization >
</ system.web >


Hope this will help you.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 9/10/2010 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
Good Day Sheo

i am not using any authentication in my app. Please find the link to my web confing

http://www.vbforums.com/attachment.php?attachmentid=80225&d=1284100082



Thank you for posting at Dotnetfunda
[Administrator]

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: SheoNarayan on: 9/10/2010 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Its strange, the pic you have shown has <add accessType.... but your config doens't contain this word.

Check if any other config is under the roon, looks like you have one under wwwroot, see if that is clashing or check your machine.config is messed up.

Let me know if you are able to resolve this issue.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response