Threading.Timer callback Impersonation problem RRS feed

  • Question

  • Hi,

    I am using Threading.Timer in a WCF service hosted in IIS. In the web.config the Identity Impersonation is enabled to a windows domain user.

    The Thread Timer is used to called a Delayed DB Update and to Send an Email.

    The problem is,

    Inside the callback the Identity of the current thread is defaulted to IIS Process's Identity. (and not the Impersonated Idenity specified in web.config file)

    So, in the lack of Impersonation my DB Call fails with "Login failed for user..." error. (my sql is configured with "Integrated Authentication")

    Is there a way that would make my call back work with the Impersonated Identity?? and why is the Timer class not impersonating the Identity on CallBack??



    Monday, September 17, 2012 5:34 AM