#2 Access Violation in ASP.NET

closed-fixed
nobody
None
5
2006-11-22
2006-11-21
No

When Using Report.dll from ASP.NET and loading an image by file name, you get an access violation error.

The patch is listed below:

The stream has had 'FileAccess.Read' added, since you never need to write to the File.

//----------------------------------------------------------------------------------------------------x

/// <summary>Creates a new image object.</summary>

/// <param name="sFileName">Filename of the Image</param>

/// <param name="rWidth">Width of the image</param>

/// <param name="rHeight">Height of the image</param>

public RepImage(String sFileName, Double rWidth, Double rHeight) {

this.stream = new FileStream(sFileName, FileMode.Open ,FileAccess.Read);

this.rWidth = rWidth;

this.rHeight = rHeight;

}

Discussion

  • Otto Mayer

    Otto Mayer - 2006-11-22

    Logged In: YES
    user_id=336047
    Originator: NO

    Thank You!
    Otto Mayer

     
  • Otto Mayer

    Otto Mayer - 2006-11-22
    • status: open --> closed-fixed
     

Log in to post a comment.