Fix: „There is a duplicate ‚uri‘ section defined“ on DotNetOpenAuth

 

A little hint about what to do if you receive this error.

Following setup for me:

- Asp.NET MVC project including .NET Framework 4.0

- DotNetOpenAuth via NuGet installed

- The Webprojects also used “Cassini”

During the deployment to an ordinary IIS I received this error message:

“There is a duplicate ‘uri’ section defined”

This line was marked in red:

<section name=”uri” type=”System.Configuration.UriSection, System, Version=2.0.0.0,Culture = neutral, PublicKeyToken=b77a5c561934e089” />

image

Solution

(Very easy Zwinkerndes Smiley) Delete the following line from your own Web.config:

<section name=”uri” type=”System.Configuration.UriSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″ />

Reason: This entry is already included into the machine.config of .NET 4.0 applications so it would be double.

The Problem is only in connection with IIS and IIS Express. “Cassini” doesn’t recognize it at all (unfortunately). This Hint is, like almost every time from Stackoverflow (but in my opinion the best answer is a little bit too complicated so I decided to write this blogpost Zwinkerndes Smiley)

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

About the author

Written by Code Inside Team

Learn more about our team.

Comment on this post

Recent Posts

  • Git-Pull Request mergen for beginners

    My project “KnowYourStack.com” (the working title was BizzBingo – a detailed blogpost will follow soon) lays on GitHub and I’ve recognized a Problem where Daniel Lang helped me a lot. At the end he created a Fork for my Project and laid a Pull Request: The question is: How do I transfer the changes to ...

  • Carriage Return / new line in Textareas

      A little task: each new text line (Carriage Return/ if you press enter ) in a Textarea should be an element on a list – so what’s the easiest way? Actual a basic element in the web and the user make aware distributions – so it would be fair to dignify it. Little MVC ...

  • WebDev Playground: dabblet.com for HTML/CSS, jsfiddler.com for JS & HUrl.it for REST

      What was reserved for mighty Desktop Apps in the past is now coming closer to the web. I’ve going to present three tools to you which are very useful for web developer. At least all the tools are quite cool in there functionality. Playground for HTML/CSS If you need a quick Playground for CSS ...

  • image1452_thumb.png
    Javascript to Dart Translator

      Dart, a Google Javascript alternative was presented a few months ago and the web developer scene are a little bit unsure about the usability of Dart. To declare the language Google has translated the Javascript basics into Dart. The result is this “Translator”. In my opinion the name doesn’t find that well because it’s ...

  • image1366-570x194.png
    Twitter Bootstrap as UI-kit

      HTML and CSS are not foreign words for me but I regret, I’m not a Web designer – I see myself as a webdeveloper. But at least a dressy side is a must. But thank good there are some ready “Systems”. Twitter Bootstrap Twitter Bootstrap is a Toolkit for every kind of Web applications. ...

Support us