On this page.... RSS 2.0 | Atom 1.0 | CDF
# Thursday, March 17, 2005

In a previous blog, I discussed the difficulties I had in getting activity tracking to work for dasBlog, which ultimately boiled down to the fact that threads in the ThreadPool (which dasBlog uses for logging activity) do not share the impersonated identity of a web application. 

The easy solution, if your hoster will allow it, is to call them up and say, "hey, give ASP.NET's default process identity Modify permissions on the logs directory."  However, if your hosting provider won't do that or if you prefer not to do that yourself, you have another option.

This article, on ASPAlliance.com, describes the steps you can take to get ThreadPool threads to use your impersonated identity.  It describes how to set up application-wide impersonation like your hoster might do it and then shows how to deal with it.  I included a helper class for use with this scenario that can be found as a download on the last page.

If you have any comments or suggestions to make it better, feel free to share!

(Omar has agreed to include this in a future build of dasBlog if I work it into the project for him, so if you'd like this feature let me know.)

Thursday, March 17, 2005 7:11:05 AM (Eastern Standard Time, UTC-05:00)  #    Disclaimer  |  Comments [2]  |  Tracked by:
"free online multiplayer poker games" (free online multiplayer poker games) [Trackback]

Friday, March 18, 2005 9:46:42 AM (Eastern Standard Time, UTC-05:00)
Now that's some useful code!
The Todd
Tuesday, June 14, 2005 2:35:51 AM (Eastern Daylight Time, UTC-04:00)
Hmm, I just tried this out by using your code in the LogDataService with no luck. I'm not seeing any difference when in the identity that the process is running under. Any ideas?
Comments are closed.

The opinions expressed herein are solely my own personal opinions, founded or unfounded, rational or not, and you can quote me on that.

Thanks to the good folks at dasBlog!

Copyright © 2020 J. Ambrose Little