none
Custom cache service - Configuring SqlCacheDependency programatically. RRS feed

  • Question

  • Hello All,

    I'm not completely sure if I can post this question here.

    I'm writing a WCF service which caches the frequently used database in HttpRuntime Cache.

    I have used SqlCacheDependency and everything is working fine. I could refresh the Cache if there is any update in database records.

    Problem is: SqlCacheDependency uses a config file section (sqlCacheDependency -> databases), to monitor database. This section in turn refers the ConnectionString section. I want to set this ConnectionString through code.

    Because, All other applications has encrypted connection string, and it gets decrypted before creating SqlConnection object. I want to do the same thing with SqlCacheDependency.

    Kindly let me know if I can set the connection string programatically.

    Thanks in advance.!


    Happy Coding, Kishore.

    Monday, June 3, 2013 12:00 PM

Answers