G
Guest
I am trying to open pdf docs using IE via an ASP.NET application written in VB.net. Here is the simple sample I'm trying to use..
'Set the appropriate ContentType
Response.ContentType = "Application/pdf
'Get the physical path to the file
Dim sFilePath As String = ConfigurationSettings.AppSettings("RoutingSheetPath") & "\" & "WO_0000828073_20040102_050309.pdf
'Write the file directly to the HTTP output stream
Response.WriteFile(sFilePath
Response.End(
This is a valid file but it is being returned as the name of the webpage with the .aspx extension. When it is returned I am prompted to save/open. When I open it , it opens in notepad. If I save it as is with the aspx extension and then open it with acrobat it opens fine. I have tried Fiddler to see what is going on and I am desperate to get this fixed.
Thanks in advance
Pat
'Set the appropriate ContentType
Response.ContentType = "Application/pdf
'Get the physical path to the file
Dim sFilePath As String = ConfigurationSettings.AppSettings("RoutingSheetPath") & "\" & "WO_0000828073_20040102_050309.pdf
'Write the file directly to the HTTP output stream
Response.WriteFile(sFilePath
Response.End(
This is a valid file but it is being returned as the name of the webpage with the .aspx extension. When it is returned I am prompted to save/open. When I open it , it opens in notepad. If I save it as is with the aspx extension and then open it with acrobat it opens fine. I have tried Fiddler to see what is going on and I am desperate to get this fixed.
Thanks in advance
Pat