Hi,
Has anyone ever used Response.BinaryWrite to display dwf files? So far, I can't get it to work with dwf files, like I can with Excel, Word, graphics, and PDF files. Here's the code:
Response.AddHeader "Content-Disposition", "inline"
Response.AddHeader "Content-Length", strFileSize
Response.Charset = "UTF-8"
Response.ContentType = "drawing/x-dwf"
Response.BinaryWrite objStream.Read
Response.Flush
I can open all kinds of other files (inline) except dwf files.
Here is what is happening in detail:
1) It does not open the dwf file inline. It pops up an instance of the Autodesk Express Viewer and opens it inside of that. With other files, I can open inline. In addition, it asks me if I want to save or open the file at first. I don't want the customer to have to answer that. I want it to simply open up inline.
2) In order to get the dwf file to open up, I had to modify the registry...set the dwf content type to "drawing/x-dwf". It used to show "Model/vnd.dwf". It wouldn't work with that content type. Again, I wouldn't want my users to have to modify the registry.
If I can get this to work, it will solve some security-related problems that I was having. Has anyone had any luck using this type of functionality?
Thanks in advance,
Danny