2.0 Enabling the database for SQL cache dependency (With windows auth)
C:\Program Files\Microsoft Visual Studio 8\VC>aspnet_regsql -S 10.140.4.107 -E -d Northwind -ed -t Customers -et
<caching>
<sqlCacheDependency enabled=”true” pollTime=”600”>
<databases>
<add name=”Northwind” connectionStringName=”NorthwindConnectionString”/>
</databases>
</sqlCacheDependency>
</caching>
</system.web>
</configuration>
<asp:SqlDataSource ID=”SqlDataSource1” runat=”server” CacheDuration=”120” ConnectionString=”<%$ ConnectionStrings:NorthwindConnectionString %>”
EnableCaching=”True” SelectCommand=”SELECT * FROM [Customers]” SqlCacheDependency=”Northwind:Customers”></asp:SqlDataSource>
<caching>
<sqlCacheDependency enabled=”true” pollTime=”600”>
<databases>
<add name=”Northwind” connectionStringName=”NorthwindConnectionString”/>
</databases>
</sqlCacheDependency>
</caching>
</system.web>
</configuration>
<asp:SqlDataSource ID=”SqlDataSource1” runat=”server” CacheDuration=”120” ConnectionString=”<%$ ConnectionStrings:NorthwindConnectionString %>”
EnableCaching=”True” SelectCommand=”SELECT * FROM [Customers]” SqlCacheDependency=”Northwind:Customers”></asp:SqlDataSource>
Comments
Post a Comment