interesting! cystal report dll and impersonation



Dear all,

I found a very interesting thing about viewing crystal report (located
on network drive) with application.

To do the impersonation, modify web.config does not work, you have to
modify machine.config. which is not recommended. However, there is no
way around. To prove I did the impersonation properly, I did the below

1. Create a txt file on same network drive

2. try to write to the txt file without using any impersonation, it

3. modify web.config to do impersonation, then the application could
write to the txt file, but still failed to load crystal report.

4. modify machine.config to do impersonation, then the application
could write to the txt file, and load the crystal report.

Both impersonation are in the context of my windows account.
I use vs.2003

In theory, modify machine.config and web.config should achieve the same
effect for my web application, but impersonate machine.config, normally
is not accepted, since all the web application running on the same web
server will be impersonated.

Anyone could give me answer?




Since no one replies, I just tell you what I have found so far(still
need to be tested, wait for system admin at the moment)

Using impersonation to access resources on network drive also depends
on server's configuration, it could accept your request as being
impersonated or just using that machine's own account. That's probably
why changing maching.config works. However, modify machine.config is
not suggested anyway, so you may ask system admin to config the
server(where the resources stored) to accept delegation, so changing
web.config will work.

However, this will possibly leave another security hole to the server,
malicious program will using impersonation to attack the server.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question