Impersonation is a subject of
Asp.net.
So, I don't think you can do this in
IIS
.
What you need is the following:
1. Implement a method that does impersonation programmatically, and do not impersonate in
web.config
.
2. Check the virtual directory name using the
Request.ApplicationPath
property and call this method if only it matches with your target virtual directory (You might be able to do this in the
Application_BeginRequest
event in
Global.asax
or in some base class method).
I believe, you can Google and get some codes to do programmatic impersoation.
This Link[
^] might help you.