Response.TransmitFile failed 0x8007052e

I was attempting to use Response.TransmitFile to stream a pdf directly to the user but it kept erroring with the following message in the event viewer:

TransmitFile failed. File Name: \somenaspath.pdf,
Impersonation Enabled: 0, Token Valid: 1, HRESULT: 0x8007052e

Turns out, you can’t use TransmitFile on any files that do not exist under the virtual application.  So trying to serve up a PDF from the NAS would never work this way :(.

I fell back to using .WriteFile and didn’t have the same problems.

 

 

Advertisement