
DESCARGAR ARCHIVO DE BASE DE DATOS
Publicado por Luis Angel (3 intervenciones) el 05/09/2014 22:55:37
Tengo un problema al descargar un archivo guardado en bytes en mi base de datos desde una maquina cliente.
este el procedimiento que uso para descargar el archivo.
Cuando ejecuto en el servidor no me sale ningun problema y me lo descarga normal, pero en el cliente me sale este error.
Server Error in '/Produccion' Application.
Access to the path 'c:\archivo.docx' is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access to the path 'c:\archivo.docx' is denied.

ES URGENTE PORFAVOR NECESITO SU AYUDA
este el procedimiento que uso para descargar el archivo.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Dim OTABLE As DataTable
OTABLE = control.Buscar_Archivo(CInt(dgvingreso.SelectedRow.Cells(1).Text))
Dim result As Byte() = OTABLE.Rows(0).Item(0)
Dim extension As String = OTABLE.Rows(0).Item(1)
Select Case extension
Case "image/doc"
File.WriteAllBytes("c:\archivo.doc", result)
Case "image/docx"
File.WriteAllBytes("c:\archivo.docx", result)
Case "image/jpeg"
File.WriteAllBytes("c:\archivo.jpg", result)
Case "image/pdf"
File.WriteAllBytes("c:\archivo.pdf", result)
End Select
Cuando ejecuto en el servidor no me sale ningun problema y me lo descarga normal, pero en el cliente me sale este error.
Server Error in '/Produccion' Application.
Access to the path 'c:\archivo.docx' is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access to the path 'c:\archivo.docx' is denied.

ES URGENTE PORFAVOR NECESITO SU AYUDA
Valora esta pregunta


0