我们希望使用带有topshelf的entitymanager控制台以3层模式运行我们的wpf客户端应用程序,以在本地测试和运行实体服务器。
我们只能使用提供的Tools ServerConsole.exe找到文档,但我们想要自己构建控制台。
是否可以使用控制台应用程序构建实体服务器并在本地运行?
文档http://drc.ideablade.com/devforce-2012/bin/view/Documentation/deploy-console没有解释,如何在没有提供ServerConsole.exe的情况下构建控制台。
答案 0 :(得分:0)
DevForce将以三种方式托管EntityServer
(实际上是四种):
托管选项全部启动至少两个WCF服务:EntityServiceHost
和EntityServerHost
。这些是System.ServiceModel.ServiceHost
的公共子类型,可以在IdeaBlade.EntityModel.Server程序集中找到。我们不提供有关如何使用这些内容的文档或指导。
如果你能告诉我更多关于你的要求的话,我可以提供其他选择。
答案 1 :(得分:0)
我们一直在n层模式下接收运行wpf applikation的错误。
我们在http://localhost:8080/TestEntityService
设置了一个vistual目录我们正在为wpf-ntier应用程序使用visual studio模板,但只要我们想要连接到服务器层,就会收到一些weard错误。
我们可以使用Internet Explorer浏览该服务:http://localhost:8080/TestEntityService/EntityServer.svc
但我们的wpf客户端总是抛出一个非常简单的例外:
Sunrise.Shells.Lisp.vshost.exe Error: 0 : 2017-03-23
10:29:12.6148|ERROR||Sunrise.Modules.Instruments.ViewModels.HostViewModel+<LoadInstruments>d__112 | MoveNext ==> Exception has been thrown by the target of an invocation.
InnerException:
Communications with the service 'EntityServer' using Uri of 'http://localhost:8080/TestEntityService/EntityServer.svc cannot be started. See the internal exception for more information.
InnerException:
Type 'MongoDB.Driver.Core.WireProtocol.Messages.Encoders.BinaryEncoders.InsertMessageBinaryEncoder`1+InsertFlags[TDocument]' cannot be exported as a schema type because it is an open generic type. You can only export a generic type if all its generic parameter types are actual types.
StackTrace:
at System.Runtime.Serialization.DataContractSet.EnsureTypeNotGeneric(Type type)
at System.Runtime.Serialization.XsdDataContractExporter.GetSchemaTypeName(Type type)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.ValidateDataContractType(Type type)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter..ctor(OperationDescription description, DataContractFormatAttribute dataContractFormatAttribute, DataContractSerializerOperationBehavior serializerFactory)
at System.ServiceModel.Description.DataContractSerializerOperationBehavior.GetFormatter(OperationDescription operation, Boolean& formatRequest, Boolean& formatReply, Boolean isProxy)
at System.ServiceModel.Description.DataContractSerializerOperationBehavior.System.ServiceModel.Description.IOperationBehavior.ApplyClientBehavior(OperationDescription description, ClientOperation proxy)
at System.ServiceModel.Description.DispatcherBuilder.BindOperations(ContractDescription contract, ClientRuntime proxy, DispatchRuntime dispatch)
at System.ServiceModel.Description.DispatcherBuilder.ApplyClientBehavior(ServiceEndpoint serviceEndpoint, ClientRuntime clientRuntime)
at System.ServiceModel.Description.DispatcherBuilder.BuildProxyBehavior(ServiceEndpoint serviceEndpoint, BindingParameterCollection& parameters)
at System.ServiceModel.Channels.ServiceChannelFactory.BuildChannelFactory(ServiceEndpoint serviceEndpoint, Boolean useActiveAutoClose)
at System.ServiceModel.ChannelFactory.CreateFactory()
at System.ServiceModel.ChannelFactory.OnOpening()
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open()
at System.ServiceModel.ChannelFactory.EnsureOpened()
at System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address)
at IdeaBlade.EntityModel.WcfProxy`1.CreateProxyCore()
服务器没有对mongodb dll的任何引用,但客户端无法连接。
Type 'MongoDB.Driver.Core.WireProtocol.Messages.Encoders.BinaryEncoders.InsertMessageBinaryEncoder`1+InsertFlags[TDocument]'