Zoloft generic 10mg, Zoloft 6 free samples - Best Prices, Pill Shop Order zoloft now, Zoloft australia - Big Discounts, Online Drug Shop Mail online order cialis, Purchase no rx cialis - Pill Shop, Canadian Pharmacy Buying propecia soft tabs 100 mg, Buy propecia without prescription - Canadian Pharmacy, Best Prices Potassium iodide canadian pharmacy dosage, Potassium iodide for sale in uk - Guaranteed Shipping, Canadian Pharmacy Potassium iodide on line canada, Where to buy potassium iodide in beijing - Online Drug Store, Canadian Pharmacy Viagra fast delivery, Cost of generic viagra - Canadian Pharmacy, Online Pill Store Discounted viagra online, Viagra uk cheap purchase buy - Cheap Prices, Secure and Anonymous Cheap potassium iodide ship next day, Potassium iodide canadian pharmacy dosage - Online Drug Shop, Cheap Prices Buy fast phentermine, Price check 50 mg phentermine - Guaranteed Shipping, Online Pill Store Cheap uk cialis, Pfizer mexico cialis - Big Discounts, Canadian Pharmacy Genric viagra, Viagra generic 10mg - Best Prices, Secure and Anonymous Cheap levitra buy online euro, Free levitra samples - Online Pharmacy, Online Drug Store Buying cialis next day delivery, Female cialis no prescription - Pill Shop, Online Drug Store Buying cialis soft tabs 100 mg, For sale cialis - Online Drug Shop, Big Discounts How to get propecia online, Discount propecia without prescription - Cheap Prices, Guaranteed Shipping Free propecia in the uk, Cheep propecia uk - Secure and Anonymous, Online Pharmacy Order female phentermine, Generic phentermine brand - Best Prices, Guaranteed Shipping Zoloft pharmacy online, Buy zoloft online cheap uk - Best Prices, Pill Shop Generic viagra online pharmacy, Viagra visa - Big Discounts, Best Prices

“Access is denied” connecting to WAS-hosted WCF service using impersonation

July 10, 2008 – 4:49 pm

This error actually pertains to any IIS-hosted .Net Framework application that utilizes impersonation, but I ran into it implementing a WAS-hosted WCF service in Windows 2008. It rears its ugly head in the form of an exception message in the following format: “Could not load file or assembly *insert random assembly here* or one of its dependencies. Access is denied.” The assembly can be any of the many DLLs that you have in your bin\ directory for the application, and the error does not always appear, only intermittently. Restarting IIS, or changing files (forcing the app pool to cycle) will sometimes solve the problem temporarily, but never permanently.

The solution is to give all impersonated users write permissions to the ASP.Net temp directory (“%systemroot%\Microsoft .Net\Framework\v2.0.50727\Temporary ASP.NET Files” in the case of the 2.0/30/3.5 versions). MSDN talks briefly about the permissions needed for various Framework directories for impersonation and process users here: http://msdn.microsoft.com/en-us/library/aa719568.aspx I believe the problem is caused by the .Net Framework dynamically compiling portions of the app and/or referencing new DLLs for the first time as the impersonated user, and not being able to copy them to the temp directory. Obvious from the exception message, eh?

Post a Comment