0

I have simple .net wcf service which works on the Apache and mod-mono. if I access service like https://localhost/Myservice.svc it works correctly, but if I access like https://my.server.net/Myservice.svc (even from the same computer) I see exception even I try to request wsdl from service

Application Exception

System.InvalidOperationException
HttpListenerContext does not match any of the registered channels

Description: HTTP 500.Error processing request.

Details: Non-web exception. Exception origin (name of application or object): System.ServiceModel.
Exception stack trace: at 
System.ServiceModel.Channels.Http.HttpListenerManager.ProcessNewContext (System.ServiceModel.Channels.Http.HttpContextInfo ctxi) [0x0000e] in <e281f37e433a4b9291b04f8a9c25b68f>:0 at System.ServiceModel.Channels.SvcHttpHandler.ProcessRequest (System.Web.HttpContext context) [0x00060] in <e281f37e433a4b9291b04f8a9c25b68f>:0 at System.Web.HttpApplication+<Pipeline>c__Iterator1.MoveNext () [0x00dd7] in <d3ba84a338d241e2ab5397407351c9cd>:0 at System.Web.HttpApplication.Tick () [0x00000] in <d3ba84a338d241e2ab5397407351c9cd>:0 Version Information: 4.6.1 (tarball Fri Oct 21 13:04:27 CEST 2016); ASP.NET Version: 4.0.30319.42000 Powered by Mono
HDJEMAI
  • 9,436
  • 46
  • 67
  • 93
  • So, what is your question? What have you tried so far? – DarkCygnus Jun 21 '17 at 18:14
  • @GrayCygnus My question is how to run my service for fully qualified dns name and avoid this exception. Is this problem of apache config or problem of my application? I checked my service in the IIS it is working correctly. I even do not know what I can try to change. – Александр Махин Jun 22 '17 at 07:56

1 Answers1

0

Change in the Web.config

<serviceHostingEnvironment multipleSiteBindingsEnabled="false" />

And

<endpoint address="http://server.com/"