New Posts New Posts RSS Feed: Cannot connect to IIS-hosted server with custom config
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Cannot connect to IIS-hosted server with custom config

 Post Reply Post Reply
Author
John View Drop Down
Newbie
Newbie


Joined: 06-May-2013
Posts: 5
Post Options Post Options   Quote John Quote  Post ReplyReply Direct Link To This Post Topic: Cannot connect to IIS-hosted server with custom config
    Posted: 06-May-2013 at 9:31am
Hey,
I am trying to connect from console/WPF client to IIS-hosted server with custom configuration, let's say net.tcp binding.
The client and the server define corresponding <serviceModel> sections.
The client defines the minimal <objectServer> section just for being distributed.
The server seems to be OK - I can browse to its site and I can connect via ChannelFactory to both EntityService.svc and EntityServer.svc.
However, whenever the client tries to create its EntityManger subclass, it throws InvalidOperationException with the message:
"Cannot find ObjectServer or default ServiceKey", followed by EndpointNotFoundException claiming that there was no endpoint to the URI that I DO connect via channel factory!
I carefully follow your detailed explanations here:
'http://drc.ideablade.com/devforce-2012/bin/view/Documentation/code-sample-custom-client-servicemodel' and more, but it is not working...
I tried using versions 7.1.1 and 7.1.2.
Back to Top
John View Drop Down
Newbie
Newbie


Joined: 06-May-2013
Posts: 5
Post Options Post Options   Quote John Quote  Post ReplyReply Direct Link To This Post Posted: 07-May-2013 at 2:31am
Sorry, I had a mistake in my client's app.config.
The client endpoint's address had a similar but wrong URI pointing to another server site with different configuration.
I still don't know why my own ChannelFactory connected successfully, but never mind.
Anyway, there is still a first-chance InvalidOperationException with "Cannot find ObjectServer or default ServiceKey" message, which is thrown on debug mode when I turn on the option "Debug --> Exceptions --> Thrown".
Is this by design? It would be cleaner if no exception were thrown when a satisfying <serviceModel> configuration was supplied.
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: 13-May-2013 at 11:12am
John,

I'm not able to see any first-chance exception being thrown.
Could I take a look at your client/server config files?
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: 14-May-2013 at 3:51pm
John,

Looking back at this issue I could get the first chance exception. (the custom config plays a role here)

I'm filing a bug report so to suppress the exception.
Back to Top
John View Drop Down
Newbie
Newbie


Joined: 06-May-2013
Posts: 5
Post Options Post Options   Quote John Quote  Post ReplyReply Direct Link To This Post Posted: 21-May-2013 at 8:12am
Thanks.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down