Hello Everybody.
I got some problems with impersonation.
I have created a asp.net intranet site. The short of it is that the end user gets a grid displayed with pdf files. The pdf files are located on another sever behind locked security to which the enduser has no directly access.
When the user clicks on a file in the grid the site should display the pdf file in an embeded pdf viewer on that page. In order to accomplish this i use impersonation in the code-behind secion.
Using impersonationContext As New WindowsImpersonationContextFacade()
Me.ShowPdf1.FilePath = c_TempFilePath
End Using
(Note: this code is used from with some modifications to fit my purposes. I also know this works because i use the exact same code in a vb.net app to access the same files successfully.)
As long as i am testing this (domain admin with rights to that repository) it works fine - so i know the basic loading of the file works. However, for the enduser it does not work. They don't get an error, but the pdf does not display.
My assumption is that the file does not actually get loaded in the behind-code but that code only passes the info to the client and the client loads the file.
If that is true, that would explain the failure as the client does not have the read right to the repository and the impersonation is already gone.
Question:
- am i correct with my assumption?
- how do I do this correctly?
As always - thank you for your great help!
I got some problems with impersonation.
I have created a asp.net intranet site. The short of it is that the end user gets a grid displayed with pdf files. The pdf files are located on another sever behind locked security to which the enduser has no directly access.
When the user clicks on a file in the grid the site should display the pdf file in an embeded pdf viewer on that page. In order to accomplish this i use impersonation in the code-behind secion.
Using impersonationContext As New WindowsImpersonationContextFacade()
Me.ShowPdf1.FilePath = c_TempFilePath
End Using
(Note: this code is used from with some modifications to fit my purposes. I also know this works because i use the exact same code in a vb.net app to access the same files successfully.)
As long as i am testing this (domain admin with rights to that repository) it works fine - so i know the basic loading of the file works. However, for the enduser it does not work. They don't get an error, but the pdf does not display.
My assumption is that the file does not actually get loaded in the behind-code but that code only passes the info to the client and the client loads the file.
If that is true, that would explain the failure as the client does not have the read right to the repository and the impersonation is already gone.
Question:
- am i correct with my assumption?
- how do I do this correctly?
As always - thank you for your great help!