Note that there are some explanatory texts on larger screens.

plurals
  1. PORetrieve <caching> element from web.config
    primarykey
    data
    text
    <p>I've been trying to get the caching element from my web.config but have thus far failed.</p> <p>When using this code:</p> <pre><code>Configuration conf = WebConfigurationManager.OpenWebConfiguration(System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath); </code></pre> <p>I am able to get at the web.configh file. When i use </p> <pre><code>conf.GetSection("system.web/membership"); </code></pre> <p>I succefuly get the membership section.</p> <p>When i use</p> <pre><code>conf.GetSection("system.web/caching"); </code></pre> <p>I get null.</p> <p>Any ideas ? </p> <p>part of the web.config below:</p> <pre><code> &lt;system.web&gt; &lt;caching&gt; &lt;sqlCacheDependency enabled="true" pollTime="1000"&gt; &lt;databases&gt; &lt;clear /&gt; &lt;add name="Tests" pollTime="1000" connectionStringName="TestsConnectionString"/&gt; &lt;/databases&gt; &lt;/sqlCacheDependency&gt; &lt;/caching&gt; &lt;authentication mode="Forms"&gt; &lt;forms loginUrl="~/Account/Login.aspx" timeout="2880"/&gt; &lt;/authentication&gt; &lt;membership&gt; &lt;providers&gt; &lt;clear/&gt; &lt;add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/&gt; &lt;/providers&gt; &lt;/membership&gt; </code></pre> <p>....</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload