Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 40787 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
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 15873 [details]
Service page generated by WCF with highlighting mentioned in the code example
I'm running Mono on Raspbian, which apparently comes with version 3.2.8 when I install it (apt-get install mono-complete). I see now that this is not the latest version, but I'm not sure how I can upgrade it so that I can test this on a newer version.
I have created a WCF service that needs to present a specific WSDL file (for backwards compatibility). I tell WCF to tell the consumers of the service to use a specific WSDL file (instead of the one being generated by WCF).
In regular .Net on Windows (not using Mono) this works as in the attached screenshot.
The highlighted numbers point to examples in the code below:
#1 - The address the WCF service is set up to use
#2 - The WSDL referred to in the ExternalMetadataLocation property
Also, if you go to http://localhost:8080/myservice?wsdl you are redirected to the custom WSDL.
In Mono the WCF service just presents the autogenerated WSDL for the service, when it should instead present a link to the external WSDL file as well as redirect to the external file.
Example of how WCF is set up to use a specific WSDL file:
MyService service = new MyService();
// See #1 in attached screenshot
ServiceHost host = new ServiceHost(service, new Uri("http://localhost:8080/myservice");
var behaviour = host.Description.Behaviors.Find<ServiceBehaviorAttribute>();
behaviour.InstanceContextMode = InstanceContextMode.Single;
ServiceMetadataBehavior smb = new ServiceMetadataBehavior();
// See #2 in attached screenshot
smb.ExternalMetadataLocation = new Uri("http://localhost:8080/reachable/wsdl/myservice.wsdl", baseAddress.Scheme, baseAddress.Host, baseAddress.Port));
smb.HttpGetEnabled = true;
I have now been able to upgrade to 4.0.2 and the issue is there as well.
Verified on 220.127.116.11