Bug 414418 - Unable to connect to a service on anything other than the exact URI used for instantiation
Summary: Unable to connect to a service on anything other than the exact URI used for ...
Status: NEW
Alias: None
Product: Mono: Class Libraries
Classification: Mono
Component: WCF (show other bugs)
Version: SVN
Hardware: Other Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Noam Lampert
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-04 16:59 UTC by Levi Bard
Modified: 2010-05-20 04:22 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Service contract (236 bytes, text/x-csharp)
2008-08-04 16:59 UTC, Levi Bard
Details
Service implementation (198 bytes, text/x-csharp)
2008-08-04 16:59 UTC, Levi Bard
Details
Service instantiation (865 bytes, text/x-csharp)
2008-08-04 17:00 UTC, Levi Bard
Details
Client instantiation (684 bytes, text/x-csharp)
2008-08-04 17:00 UTC, Levi Bard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Levi Bard 2008-08-04 16:59:01 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.
Comment 1 Levi Bard 2008-08-04 16:59:38 UTC
Created attachment 231580 [details]
Service implementation
Comment 2 Levi Bard 2008-08-04 17:00:04 UTC
Created attachment 231581 [details]
Service instantiation
Comment 3 Levi Bard 2008-08-04 17:00:22 UTC
Created attachment 231582 [details]
Client instantiation