Bugzilla – Bug 414418
Unable to connect to a service on anything other than the exact URI used for instantiation
Last modified: 2010-05-20 04:22:41 UTC
Created attachment 231579 [details] Service contract A client is unable to connect to a service on anything other than the exact URI used for instantiation. E.g., if the server is instantiated with an endpoint URI of "http://localhost:8080" , and the client is instantiated with an endpoint URI of "http://127.0.0.1:8080", the result of trying to connect is: Unhandled Exception: System.Xml.XmlException: Expecting Envelope tag from namespace http://schemas.xmlsoap.org/soap/envelope/, got h1 and instead Line 1, position 2. at System.Xml.XmlReader.ReadStartElement (System.String localName, System.String namespaceName) [0x0008b] in /home/lbar4/dev/mono-svn/mcs/class/System.XML/System.Xml/XmlReader.cs:752 at System.ServiceModel.Channels.XmlReaderMessage.ReadEnvelopeStart () [0x00027] in /home/lbar4/dev/olive/class/System.ServiceModel/System.ServiceModel.Channels/MessageImpl.cs:130 at System.ServiceModel.Channels.XmlReaderMessage..ctor (System.ServiceModel.Channels.MessageVersion version, System.Xml.XmlDictionaryReader reader, Int32 maxSizeOfHeaders) [0x00026] in /home/lbar4/dev/olive/class/System.ServiceModel/System.ServiceModel.Channels/MessageImpl.cs:55 at System.ServiceModel.Channels.Message.CreateMessage (System.Xml.XmlDictionaryReader envelopeReader, Int32 maxSizeOfHeaders, System.ServiceModel.Channels.MessageVersion version) [0x00022] in /home/lbar4/dev/olive/class/System.ServiceModel/System.ServiceModel.Channels/Message.cs:420 at System.ServiceModel.Channels.TextMessageEncoder.ReadMessage (System.IO.Stream stream, Int32 maxSizeOfHeaders, System.String contentType) [0x00000] in /home/lbar4/dev/olive/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncoder.cs:78 at System.ServiceModel.Channels.HttpRequestChannel.ProcessRequest (System.ServiceModel.Channels.Message message, TimeSpan timeout) [0x00261] in /home/lbar4/dev/olive/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs:151 at System.ServiceModel.Channels.HttpRequestChannel.Request (System.ServiceModel.Channels.Message message, TimeSpan timeout) [0x00000] in /home/lbar4/dev/olive/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs:82 at System.ServiceModel.ClientRuntimeChannel.Request (System.ServiceModel.Channels.Message msg) [0x00000] in /home/lbar4/dev/olive/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs:381 at System.ServiceModel.ClientRuntimeChannel.Request (System.ServiceModel.Description.OperationDescription od, System.Object[] parameters) [0x0006c] in /home/lbar4/dev/olive/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs:352 at System.ServiceModel.ClientRuntimeChannel.Process (System.Reflection.MethodBase method, System.String operationName, System.Object[] parameters) [0x00015] in /home/lbar4/dev/olive/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs:226 at __clientproxy_EchoServiceContract.echo (System.String ) [0x00000] at ServiceHostTest.EchoClient.Main (System.String[] args) [0x00035] in /home/lbar4/dev/ServiceHostTest/Client/EchoClient.cs:18 On MS.NET, if I instantiate the server with localhost, or "0.0.0.0", I'm able to successfuly connect to any of the machine's IPs (127.0.0.1, 10.0.0.50, external.hostname, etc.) Attached are some minimal classes that Just Work on MS.NET, and result in the aforementioned exception on Mono+Olive.
Created attachment 231580 [details] Service implementation
Created attachment 231581 [details] Service instantiation
Created attachment 231582 [details] Client instantiation