Community
DWF
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unsupported file type [CAdEPlotDocument::LoadStream : 595]

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
173 Views, 0 Replies

Unsupported file type [CAdEPlotDocument::LoadStream : 595]

Hi I'm programming an application in ASP.Net in which users can view DWF files through their browser, but I have a problem. With the object tag everything works fine, but since security on the drawings is of very high importance, I don't want people to see where the DWF files are located on the webserver (calling the source of the document reveals this). So I thought, just like I send a PDF to the Response object, I can send DWF files too, but it doesn't work. I even tried sending the file binary, but that didn't work neither. I keep on getting the Unsupported file type error and the file is correct, I checked it in debug mode, it starts with '(DWF ...'. Mime types have been added to the webserver. Any help is appriciated. Code (non-binary): --------------------------- Response.Buffer = True Response.ClearContent() Response.ClearHeaders() Response.ContentType = "application/x-dwf" Response.WriteFile(myDWFFile) Response.Flush() Response.Close() Code (binary): --------------------- Dim myFileSize as Long Dim myFileStream as FileStream myFileStream = New FileStream(myDWFFile, FileMode.Open) myFileSize = myFileStream.Length Dim myBinaryDWFFile(CInt(myFileSize)) as Byte myFileStream.Read(myBinaryDWFFile, 0, CInt(myFileSize)) myFileStream.Close() Response.Buffer = True Response.ClearContent() Response.ClearHeaders() Response.ContentType = "application/x-dwf" Response.BinaryWrite(myBinaryDWFFile) Response.Flush() Response.Close()
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost

 

”Tips

 

”Services