Print Page | Close Window

The remote server returned an unexpected response: (400) Bad Request.

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3206
Printed Date: 13-May-2026 at 11:29am


Topic: The remote server returned an unexpected response: (400) Bad Request.
Posted By: Chrizy
Subject: The remote server returned an unexpected response: (400) Bad Request.
Date Posted: 10-Jan-2012 at 6:49am

Getting error “The remote server returned an unexpected response: (400) Bad Request” when trying to connect to server (hosted in IIS) from a WPF client app. EntityService.svc is running OK and have checked correct versions of idea blade DLLs on both client and server. Using version 6.1.4.

 

Stack Trace

   at IdeaBlade.EntityModel.EntityManager.HandleEntityServerException(Exception ex, Boolean tryToHandle, PersistenceOperation operation, Boolean throwOnError)

   at IdeaBlade.EntityModel.EntityManager.Connect()

   at IdeaBlade.EntityModel.EntityManager..ctor(EntityManagerContext context)

   at IdeaBlade.EntityModel.EntityManager..ctor(Boolean shouldConnect, String dataSourceExtension, EntityServiceOption entityServiceOption, String compositionContextName)

   at DomainModel.SystemData.MyDB..ctor() in C:\Users\xx\Documents\Visual Studio 2010\Projects\eTech2\DomainModel\SystemData\SystemDataModel.IB.Designer.cs:line 35

Inner exception:

Server stack trace:

   at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)

   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)

   at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)

   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)

   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

 

Exception rethrown at [0]:

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

   at IdeaBlade.EntityModel.IEntityServiceContract.GetEntityServerName(String dataSourceExtension, String compositionContextName)

   at IdeaBlade.EntityModel.RemoteEntityServiceProxy.GetEntityServerName(String dataSourceExtension, String compositionContextName)

   at IdeaBlade.EntityModel.RemoteEntityServerProxyBase.Connect(Co



Replies:
Posted By: sbelini
Date Posted: 10-Jan-2012 at 3:29pm
Hi Chrizy,
 
Could you post your config files?
 
Silvio.


Posted By: Chrizy
Date Posted: 10-Jan-2012 at 3:43pm
uploads/1374/Config.zip - uploads/1374/Config.zip

Client and Server config attached


Posted By: sbelini
Date Posted: 10-Jan-2012 at 3:53pm
Thanks!
I'll take a look and follow up.
 
Silvio.


Posted By: sbelini
Date Posted: 11-Jan-2012 at 10:48am
In your app.config, instead of:
<objectServer remoteBaseURL="http://localhost/eTech2Web/" serverPort="80" serviceName="EntityService.svc" >
 
use:
 
<objectServer remoteBaseURL="http://localhost" serverPort="80" serviceName="eTech2Web/EntityService.svc" >
 
Regards,
   Silvio.


Posted By: Chrizy
Date Posted: 11-Jan-2012 at 12:57pm
Hi Silvio,
That worked.

Thanks for you help



Print Page | Close Window