Bug 290 - No exception is thrown if the ServiceContract contains no operations.
Summary: No exception is thrown if the ServiceContract contains no operations.
Alias: None
Product: Class Libraries
Classification: Mono
Component: WCF assemblies ()
Version: master
Hardware: PC Linux
: --- trivial
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-08-13 06:32 UTC by Stephen Kou
Modified: 2012-08-10 02:50 UTC (History)
3 users (show)

Tags: WCF OperationContract ServiceContract
Is this bug a regression?: ---
Last known good build:

Testcase (434 bytes, text/plain)
2011-08-13 06:32 UTC, Stephen Kou

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 on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Stephen Kou 2011-08-13 06:32:01 UTC
Created attachment 122 [details]

On MS.NET, an exception is thrown on server (ServiceHost) startup if the specified ServiceContract contains no OperationContracts.  Nothing happens on mono.  

This is illustrated in the attached sample code.

gmcs -r:System.ServiceModel.dll Program.cs

Run it on windows/ms.net -- exception occurs and program dies.
Run it on linux/mono -- seems to work fine.

Very minor, but still a bug if a bug is differing behavior from ms.net.
Comment 1 Enrico Sada 2012-08-09 17:24:14 UTC
fix in pull request #424 ( https://github.com/mono/mono/pull/424 )