对于使用远程WCF服务的工具包,我ChannelFactory<IMyService>在UnityContainer中配置了一个.
现在我想通过代码(使用Unity)配置此通道的端点行为以应用此行为:
<behaviors>
<endpointBehaviors>
<behavior name="BigGraph">
<dataContractSerializer maxItemsInObjectGraph="1000000" />
</behavior>
</endpointBehaviors>
</behaviors>
Run Code Online (Sandbox Code Playgroud)
我在MSDN上找到了这个例子(http://msdn.microsoft.com/en-us/library/ms732038.aspx)
ChannelFactory<IDataService> factory = new ChannelFactory<IDataService>(binding, address);
foreach (OperationDescription op in factory.Endpoint.Contract.Operations)
{
vardataContractBehavior = op.Behaviors.Find<DataContractSerializerOperationBehavior>() as DataContractSerializerOperationBehavior;
if (dataContractBehavior != null)
{
dataContractBehavior.MaxItemsInObjectGraph = 100000;
}
}
IDataService client = factory.CreateChannel();
Run Code Online (Sandbox Code Playgroud)
但现在我被困在Unity配置中试图这样做.我应该调查拦截吗?
我试图理解为什么我们的演员服务使用的磁盘空间比预期的多。我们的服务目前包含分布在 10 个分区上的大约 80,000 个参与者。每个参与者存储大约 150Kb 的状态。
查看我们集群中的一个(10 个)节点,我希望看到:
R_S_。这些副本 ID 与 Service Fabric Explorer 中“应用程序”节点下列出的任何值都不匹配。ActorStateStore,其大小为 5.66Gb 我试图理解的另一件事如下:
所以我的问题是:
azure-service-fabric service-fabric-stateful service-fabric-actor
我试图在Vista计算机上的Web应用程序中使用netNamedPipeBinding来托管WCF服务.
我启用了非HTTP服务激活,如本文所述:http://msdn.microsoft.com/en-us/library/ms731053.aspx
我按如下方式配置了服务:
<endpoint address="net.pipe://myservice"
binding="netNamedPipeBinding"
bindingConfiguration="MyService_NamedPipeBindingConfig"
contract="ICMyService" />
<netNamedPipeBinding>
<binding name="MyService_NamedPipeBindingConfig"
maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None">
<transport protectionLevel="None" />
</security>
</binding>
</netNamedPipeBinding>
Run Code Online (Sandbox Code Playgroud)
当我浏览到.svc文件(在IIS上,而不是Visual Studio webserver)时,我收到以下消息:
[InvalidOperationException: The protocol 'net.pipe' is not supported.]
System.ServiceModel.Activation.HostedTransportConfigurationManager.InternalGetConfiguration(String scheme) +11461251
System.ServiceModel.Channels.TransportChannelListener.OnOpening() +84
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +229
System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout) +72
[InvalidOperationException: The ChannelDispatcher at 'net.pipe://myservice' with contract(s) '"IMyService"' is unable to open its IChannelListener.]
System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout) +118
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +261
System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +107
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +261
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +121
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +479
[ServiceActivationException: The …Run Code Online (Sandbox Code Playgroud)