|
I'm having a 3-tier configuration where i have winform-client that connects to BOS hosted in IIS. It works fine with my current app.config (client) and web.config(BOS).
Now I have requirement to allow my winform-client to change the BOS address. Thus I'm implementing IdeaBlade.EntityModel.ServiceProxyEvents based on http://drc.ideablade.com/devforce-2012/bin/view/Documentation/code-sample-custom-client-configuration - http://drc.ideablade.com/devforce-2012/bin/view/Documentation/code-sample-custom-client-configuration . And now the winfom-client always throws "System.InvalidOperationException: Cannot find ObjectServer or default ServiceKey" when I create a new instance of a DomainModelEntityManager.
Did I miss anything in the implementation? Is there any part of the app.config that I need to modify? I put a breakpoint at the constructor of my derived class of ServiceProxyEvents, i doest break there, but the two overriden method are never called.
here's the stacktrace: IdeaBlade DevForce EntityManager error --->
IdeaBlade.EntityModel.EntityServerException: Cannot find ObjectServer or default
ServiceKey ---> System.InvalidOperationException: Cannot find ObjectServer or
default ServiceKey at
IdeaBlade.Core.Configuration.ObjectServerElement.GetDefaultServiceKey() at
IdeaBlade.Core.Configuration.ObjectServerElement.GetServiceKey(String name,
Boolean throwIfNotFound) at
IdeaBlade.EntityModel.DefaultClientProxy`1.GetServiceAddress() at
IdeaBlade.EntityModel.WcfProxy`1.CreateProxyCore() at
IdeaBlade.EntityModel.WcfProxy`1..ctor(String serviceName, String serviceKey,
Boolean delayedCreation) at
IdeaBlade.EntityModel.WcfProxyFactory.GetProxy[TContract](String serviceName,
String serviceKey, String& address) at
IdeaBlade.EntityModel.RemoteEntityServiceProxyBase`1.Initialize() at
IdeaBlade.EntityModel.RemoteEntityServerProxyBase.Connect(ConnectAction action)
at IdeaBlade.EntityModel.EntityManager.Connect() --- End of inner exception
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
DomainModel.DomainModelEntityManager..ctor(Boolean shouldConnect, String
dataSourceExtension, EntityServiceOption entityServiceOption, String
compositionContextName)
|