New Posts New Posts RSS Feed: The remote server returned an unexpected response: (400) Bad Request.
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

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

 Post Reply Post Reply
Author
Chrizy View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Jan-2012
Posts: 10
Post Options Post Options   Quote Chrizy Quote  Post ReplyReply Direct Link To This Post Topic: The remote server returned an unexpected response: (400) Bad Request.
    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
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 10-Jan-2012 at 3:29pm
Hi Chrizy,
 
Could you post your config files?
 
Silvio.
Back to Top
Chrizy View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Jan-2012
Posts: 10
Post Options Post Options   Quote Chrizy Quote  Post ReplyReply Direct Link To This Post Posted: 10-Jan-2012 at 3:43pm
uploads/1374/Config.zip

Client and Server config attached
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 10-Jan-2012 at 3:53pm
Thanks!
I'll take a look and follow up.
 
Silvio.
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Chrizy View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Jan-2012
Posts: 10
Post Options Post Options   Quote Chrizy Quote  Post ReplyReply Direct Link To This Post Posted: 11-Jan-2012 at 12:57pm
Hi Silvio,
That worked.

Thanks for you help
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down