Bug 47686 - HTTP 500.Error processing request Hosting WCF REST service on Mono
Summary: HTTP 500.Error processing request Hosting WCF REST service on Mono
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: WCF assemblies ()
Version: 4.0.0
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2016-11-23 01:55 UTC by Gopal
Modified: 2016-11-23 01:56 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 47686 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Gopal 2016-11-23 01:55:49 UTC
HI Team,
I am below error hosting WCF REST service on linux cenos7 on mono which developed in visual studio 2010.

Here is the call stack i get when try to start the service.

An item with the same key has already been added.
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): mscorlib.
Exception stack trace:
  at System.ThrowHelper.ThrowArgumentException (System.ExceptionResource resource) [0x0000b] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Collections.Generic.Dictionary`2[TKey,TValue].Insert (TKey key, TValue value, System.Boolean add) [0x0008e] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Collections.Generic.SynchronizedKeyedCollection`2[K,T].InsertItem (System.Int32 index, T item) [0x00015] in <8cdac92fdd4b495ba10570db10926ad4>:0 
  at System.ServiceModel.UriSchemeKeyedCollection.InsertItem (System.Int32 index, System.Uri item) [0x00000] in <8cdac92fdd4b495ba10570db10926ad4>:0 
  at System.Collections.Generic.SynchronizedCollection`1[T].Add (T item) [0x0000c] in <8cdac92fdd4b495ba10570db10926ad4>:0 
  at System.ServiceModel.ServiceHostBase.AddBaseAddress (System.Uri baseAddress) [0x00016] in <8cdac92fdd4b495ba10570db10926ad4>:0 
  at System.ServiceModel.ServiceHostBase.ApplyServiceElement (System.ServiceModel.Configuration.ServiceElement service) [0x00030] in <8cdac92fdd4b495ba10570db10926ad4>:0 
  at System.ServiceModel.ServiceHostBase.LoadConfigurationSection (System.ServiceModel.Configuration.ServiceElement element) [0x00000] in <8cdac92fdd4b495ba10570db10926ad4>:0 
  at System.ServiceModel.ServiceHostBase.ApplyConfiguration () [0x00023] in <8cdac92fdd4b495ba10570db10926ad4>:0 
  at System.ServiceModel.ServiceHostBase.InitializeDescription (System.ServiceModel.UriSchemeKeyedCollection baseAddresses) [0x0001c] in <8cdac92fdd4b495ba10570db10926ad4>:0 
  at System.ServiceModel.ServiceHost.InitializeDescription (System.Type serviceType, System.ServiceModel.UriSchemeKeyedCollection baseAddresses) [0x0001d] in <8cdac92fdd4b495ba10570db10926ad4>:0 
  at System.ServiceModel.ServiceHost..ctor (System.Type serviceType, System.Uri[] baseAddresses) [0x0000e] in <8cdac92fdd4b495ba10570db10926ad4>:0 
  at System.ServiceModel.Channels.SvcHttpHandler.EnsureServiceHostCore () [0x00032] in <8cdac92fdd4b495ba10570db10926ad4>:0 
  at System.ServiceModel.Channels.SvcHttpHandler.EnsureServiceHost () [0x00016] in <8cdac92fdd4b495ba10570db10926ad4>:0 
  at System.ServiceModel.Channels.SvcHttpHandler.ProcessRequest (System.Web.HttpContext context) [0x00000] in <8cdac92fdd4b495ba10570db10926ad4>:0 
  at System.Web.HttpApplication+<Pipeline>c__Iterator1.MoveNext () [0x00dd7] in <79d7580b4e46487286a5f8386a98413d>:0 
  at System.Web.HttpApplication.Tick () [0x00000] in <79d7580b4e46487286a5f8386a98413d>:0 

Could you please let me know what could be the root cause?

Thanks and Regards,
Gopal BN