Configure your /etc/hosts file.
On Tue, Sep 21, 2010 at 11:10 AM, Nadeem Backus <[email protected]> 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 <[email protected]> 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 - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-list > _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
