[Mono-list] WCF service on mono

Atsushi Eno atsushieno at veritas-vos-liberabit.com
Fri Sep 24 04:02:18 EDT 2010


  I haven't confirmed but this might be due to extra request URI 
comparison in HTTP listener internals. If it indeed was, then this fix 
would get it working fine.
http://github.com/mono/mono/commit/9d66f85f1c7f715b7c98484127def692c19a9eb3

Also in that case, I think it could be workarounded by removing 
serviceMetadata(Behavior) and serviceDebug(Behavior) from the service.

Atsushi Eno


On 2010/09/22 17:41, Nadeem Backus wrote:
> My hostfile already contains references to localhost, currently it
> points to 127.0.0.1.
> Using localhost or 127.0.0.1 in the configuration file both return bad request.
>
>
> On 21 September 2010 16:27, Abe Gillespie<abe.gillespie at gmail.com>  wrote:
>> Configure your /etc/hosts file.
>>
>> On Tue, Sep 21, 2010 at 11:10 AM, Nadeem Backus<nadeem.backus at gmail.com>  wrote:
>>> Thank you for getting back to me, I have found what was causing the issue:
>>>
>>> My WCF service uses the following configuration:
>>>
>>>   <services>
>>>       <service behaviorConfiguration="mexbe"
>>> name="Example.Scheduling.Scheduler.Services.SchedulerService">
>>>         <endpoint address="" binding="basicHttpBinding"
>>> contract="Example.Services.Contract.Service.ISchedulerService" />
>>>         <endpoint address="mex" binding="mexHttpBinding"
>>> contract="IMetadataExchange" />
>>>         <host>
>>>           <baseAddresses>
>>>             <add baseAddress="http://localhost:10000/Example/Scheduler/" />
>>>           </baseAddresses>
>>>         </host>
>>>       </service>
>>>     </services>
>>>   </system.serviceModel>
>>>
>>> this configuration works fine under windows (this is a .Net 3.5
>>> Application), but under mono this configuration fails with a bad
>>> gateway (400) error.
>>>
>>> The solution was to use the IP address of the network (eth0
>>> -192.168.35.2) for example, because localhost and 127.0.0.1 all fail
>>> with the bad request error. It would nice to be able to use localhost
>>> as it is generic thus making deployment onto multiple machines easier.
>>>
>>> Thanks for your hard work.
>>>
>>> Nadeem
>>>
>>> On 24 August 2010 23:06, Nadeem Backus<nadeem.backus at gmail.com>  wrote:
>>>> I have a simple console hosted wcf service using basichttpbinding,
>>>> when invoking the service I am getting a bad request (400), the
>>>> executable assembly also works fine under windows.
>>>>
>>>> I am using the mono opensuse livecd and have also tryed the service on
>>>> centos with the latest mono 2.6.7
>>>>
>>>> Does any one have any idea why this might be occuring?
>>>>
>>>> here is the serviceModel node from the app.config:
>>>>
>>>>   <system.serviceModel>
>>>>     <bindings />
>>>>     <behaviors>
>>>>       <serviceBehaviors>
>>>>         <behavior name="mexbe">
>>>>           <serviceMetadata />
>>>>           <serviceDebug includeExceptionDetailInFaults="True"/>
>>>>         </behavior>
>>>>       </serviceBehaviors>
>>>>     </behaviors>
>>>>     <services>
>>>>       <service behaviorConfiguration="mexbe" name="NB.Services.SummaryService">
>>>>         <endpoint address="SummaryService" binding="basicHttpBinding"
>>>> contract="NB.Contract.Service.ISummaryService" />
>>>>         <endpoint address="SummaryService/mex"
>>>> binding="mexHttpBinding"  contract="IMetadataExchange" />
>>>>         <host>
>>>>           <baseAddresses>
>>>>             <add baseAddress="http://localhost:9001/NB/SummaryService/" />
>>>>           </baseAddresses>
>>>>         </host>
>>>>       </service>
>>>>     </services>
>>>>   </system.serviceModel>
>>>>
>>>> Thanks for your assistance.
>>>>
>>>> Nadeem
>>>>
>>> _______________________________________________
>>> Mono-list maillist  -  Mono-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-list
>>>
>>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
>



More information about the Mono-list mailing list