Ver Mensaje Individual
  #1  
Antiguo 12-05-2007
JuanErasmo JuanErasmo is offline
Miembro
 
Registrado: ago 2005
Posts: 544
Reputación: 19
JuanErasmo Va por buen camino
Problema mostrando imagenes en C# aspx .NET

Buenas noches amigos.
Tengo un problema amigos con una aplicacion que hice en C#
la aplicacion muestra imagenes, y funcionaba perfectamente, pero tuve que formatear mi pc, y sigue funcionando bien, pero a la hora de cargar imagenes me sale el siguiente error
Código:
 
Server Error in '/mi aplicacion' Application. 

The process cannot access the file 'C:\fotos\peronales\413079\413079\imagen_01.jpg' because it is being used by another process. 

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.IO.IOException: The process cannot access the file 'C:\fotos\personales\413079\413079\imagen_01.jpg' because it is being used by another process.

Source Error: 

Line 159:    protected void ButtonVer_Click(object sender, EventArgs e)Line 160:    {Line 161:         FileStream f = new FileStream((ListBox3.SelectedValue.ToString()), FileMode.Open);Line 162:Line 163:        byte[] b = new byte[f.Length];
Source File: c:\Inetpub\wwwroot\biomedicalm\Medicos.aspx.cs    Line: 161 

Stack Trace: 

[IOException: The process cannot access the file 'C:\fotos\personales\413079\413079\imagen_01.jpg' because it is being used by another process.]   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2014461   System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +998   System.IO.FileStream..ctor(String path, FileMode mode) +65   Medicos.ButtonVer_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\miaplicacion\formulario1.aspx.cs:161   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

ademas, no me esta mostrando las imagenes en vista en miniatura, yo ya habia desarrollado esto, y no me las deja cargar.....
como tengo que configurara el IIS para que funcione correctamente como antes? que permisos debo habilitar?

Estoy seguro de que las imagenes no estan siendo utilizadas por otro proceso. se dejan abrir 1 vez, y luego al intentar reabrirlas en mi aplicacion, me sale ese error, es como si la estuviera utilizando la misma aplicacion,
hay un time out o algo asi???

Muchas gracias amigos
Responder Con Cita