首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Orleans.GrainClient.GetStreamProviders()不起作用

Orleans.GrainClient.GetStreamProviders()不起作用
EN

Stack Overflow用户
提问于 2016-06-28 00:22:40
回答 1查看 238关注 0票数 2

在调用Orleans.GrainClient.GetStreamProviders()和Orleans.GrainClientGetStream()之后,我得到了System.NullReferenceException。我尝试在配置文件和代码中添加StreamPorvider。像GetGrain()这样的其他方法工作得很好。

我的配置文件:

代码语言:javascript
复制
<?xml version="1.0" encoding="utf-8" ?>
<!-- 
    This is a sample client configuration file. 
    For a detailed reference, see "Orleans Configuration Reference.html".
-->
<ClientConfiguration xmlns="urn:orleans">
  <GatewayProvider ProviderType="Config"/>
  <Gateway Address="localhost" Port="30000"/>
  <Statistics MetricsTableWriteInterval="30s" PerfCounterWriteInterval="30s" LogWriteInterval="300s" WriteLogStatisticsToTable="true"/>
  <StreamProviders>
    <Provider Type="Orleans.Providers.Streams.SimpleMessageStream.SimpleMessageStreamProvider" Name="PubSubType" FireAndForgetDelivery="false"/>
    <!--<Provider Type="Orleans.Providers.Streams.Persistent.AzureQueueStreamProvider" Name="AzureQueueProvider" DataConnectionString=""/> -->
  </StreamProviders>
</ClientConfiguration>

和错误堆栈跟踪

HttpException (0x80004005):对象引用未设置为对象的实例。

代码语言:javascript
复制
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9964625
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Object reference not set to an instance of an object.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9946132
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +90
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +261
EN

回答 1

Stack Overflow用户

发布于 2016-07-02 13:54:15

您需要在思洛存储器配置中具有相同的流配置,而不仅仅是客户端。检查名称和所有参数是否匹配(复制\粘贴部分;)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38058809

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档