daedalux
asked on
Access denied on Response. Write( file ) Server 2008
I have a web app that impersonates. It takes a file template, copies it to a share, then using OpenDoc dynamically edits the file and closes it. Finally it pushes the new file to the client using Response.Write(filepath). With appropriate HTML headers. Since we moved the application to Windows Server 2008 everything works until the app tries to access the file on response.write = access denied. It appears that in that moment somehow the app is not using the impersonation account based on the eror message. What about response.write is different than JavaScript window.open(filepath...) which still works in another situatiion? Is there some setting in the new IIS that I'm missing?
ASKER
Thanks for your comment.
And I see how my question might be misleading. The problem doesn't happen when the app tries to create and edit the file. In fact the owner of the file is the impersonated user of the app. The problem starts when the app tries to *read* the file to send it to the client browser, which I do by redirecting to a new page in the same app who's sole purpose is that: sending out the file, which it does by using Response.Write(filepath). Again, this issues arrises when we moved the app to Windows Server 2008.
And I see how my question might be misleading. The problem doesn't happen when the app tries to create and edit the file. In fact the owner of the file is the impersonated user of the app. The problem starts when the app tries to *read* the file to send it to the client browser, which I do by redirecting to a new page in the same app who's sole purpose is that: sending out the file, which it does by using Response.Write(filepath). Again, this issues arrises when we moved the app to Windows Server 2008.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Please try the below steps
Give read/write permission to the folder (filepath).
This can be done by right-clicking that folder and take the 'Properties' menu.
Uncheck the attribute ' Read Only' and click apply.
Please find the attached image for the same.
Folder-Properties.JPG