Hi Alvaro Pereira,
Thank you for using Microsoft Newsgroup Service. Based on your description,
you are dealing with a WebReport, the application is Internet based and you
want the user view the report to it using its own access token(identity)
when printing the
web report. Also, you've set the impersonation="true" in the web.config
file and done the right setting in IIS, however you found that when the
report is printing , the asp.net workprocess still runnging under the
ASP.NET account(the default workprocess account)? Please correct me if my
understanding is not quite accurate.
If so, this problem is concerned to the ASP.NET web security. As for the
impersonation, this feature is mostly used for the "intranet based" web
application since the workprocess will access other resources under the
user's access token(identity).
This feature is buildin ASP.NET, it should be used together with the IIS.
Generally, you should
1. set the IIS's security configuration:
select the "Windows Integrated Authentication" and disable the "Anonymous
User"
2. In asp.net web applicaiton's web.config file(note that the relative
setting in Machine.config can be overwritten by the web.config):
set the authentication mode as "Windows", for example:
<authentication mode="Windows">
</authentication>
and set the "impersonation= true"
<identity impersonate ="true" />
Then, when the user access the web application, he'll first check identity
in the IIS if pass, his identity(token) will be passed by the IIS to the
ASP.NET applicatioh(because you set the authentication mode="Windows"). And
as you also set the impersonate="true", when the asp.net workproeccess is
executing or calling some other server resources , it is using the
identity(token) passed by the IIS(just the user's identity, it should be a
valid account on the server machine).
For more infomation on ASP.NET's security mode and configuration, you can
view the tech articels on MSDN, here is the web link for the asp.net
security architecture:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconaspnetarchitecture
..asp?frame=true
and the impersonation:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconaspnetimpersonatio
n.asp?frame=true
Please try the preceding suggestion. If you have any questions on it,
please feel free to let me know.
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)