You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ksenia Rybakova (JIRA)" <ji...@apache.org> on 2016/11/24 09:12:58 UTC

[jira] [Closed] (IGNITE-4185) .NET: NullReferenceException in IgniteOutputCacheProvider when igniteConfiguration is missing

     [ https://issues.apache.org/jira/browse/IGNITE-4185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ksenia Rybakova closed IGNITE-4185.
-----------------------------------
    Assignee: Ksenia Rybakova

Verified.
Currently it's handled correctly:
{noformat}
Failed to initialize Apache.Ignite.AspNet.IgniteOutputCacheProvider: System.Configuration.ConfigurationErrorsException: IgniteConfigurationSection with name 'igniteConfiguration' is defined in <configSections>, but not present in configuration.
  в Apache.Ignite.AspNet.Impl.ConfigUtil.StartFromApplicationConfiguration(String sectionName, String gridName)
  в Apache.Ignite.AspNet.Impl.ConfigUtil.InitializeCache[TK,TV](NameValueCollection config, Type callerType, String defaultCacheName)
{noformat}

> .NET: NullReferenceException in IgniteOutputCacheProvider when igniteConfiguration is missing
> ---------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-4185
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4185
>             Project: Ignite
>          Issue Type: Bug
>          Components: platforms
>    Affects Versions: 1.7
>         Environment: Windows 10
> MS VS 2015
>            Reporter: Ksenia Rybakova
>            Assignee: Ksenia Rybakova
>            Priority: Trivial
>             Fix For: 1.8
>
>
> Steps:
> - Create a new C# Web application in the MS Visual Studio
> - Install Apache.Ignite.AspNet package via Tools->NuGet Package ManagerPackage Manager Console:
> - Open Web.config file and make the following changes:
> Add to <configSections>:
> {noformat}
> <section name="igniteConfiguration" type="Apache.Ignite.Core.IgniteConfigurationSection, Apache.Ignite.Core" />
> {noformat}
> Remove default sessionState section in <system.web> and add the following instead:
> {noformat}
> <sessionState mode="Custom" customProvider="IgniteSessionStateProvider">
>   <providers>
>     <add name="IgniteSessionStateProvider" type="Apache.Ignite.AspNet.IgniteSessionStateStoreProvider, Apache.Ignite.AspNet" />
>   </providers>
> </sessionState>
> {noformat}
> Add to <system.web>:
> {noformat}
> <caching>
>   <outputCache defaultProvider="apacheIgnite">
>     <providers>
>       <add name="apacheIgnite" type="Apache.Ignite.AspNet.IgniteOutputCacheProvider, Apache.Ignite.AspNet" igniteConfigurationSectionName="igniteConfiguration" cacheName="myWebCache" />
>     </providers>
>   </outputCache>
> </caching>
> {noformat}
> <igniteConfiguration> section in <configuration> is missed on purpose.
> - Run project
> Result:
> {noformat}
> Failed to initialize Apache.Ignite.AspNet.IgniteOutputCacheProvider: System.NullReferenceException: 
> in
> Apache.Ignite.AspNet.Impl.ConfigUtil.StartFromApplicationConfiguration(String sectionName, String gridName)
>   в Apache.Ignite.AspNet.Impl.ConfigUtil.InitializeCache[TK,TV](NameValueCollection config, Type callerType, String defaultCacheName)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)