views:

45

answers:

2

I am trying to run the my asp.net mvc project on IIS 7 , I am trying to impersonate the user. Where Data is the data project of my application, i have added the dll reference to the asp.net mvc project

I tried giving full control to very one to this folder

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET File.

Any clue on how to fix this error?

A: 

You could try using Process Monitor from Windows SysInternals, this will tell you exactly which file is getting the access denied message. I've used this tool on many occations to find access problems with files and the registry.

JLWarlow
How can i see which file is having an access problem?
Pinu
Run Process Monitor on the server with IIS and record a trace, then run your test where you're seeing access denied. Go back to Process Monitor then stop the trace. You then look for an entry where the result is ACCESS DENIED (you can filter the results to make this easier). If you also show the User column you can see which what account was used to try to access the file; this may help in checking your impersonation code is working. I hope this helps!
JLWarlow
A: 

I add the data.dll in the GAC and that fixed the issue.

Pinu