CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2012
    Posts
    29

    Access Violation

    Hello guys and girls! I´m facing the following problem: I´m making an asp.net application with a search function when I click the search button the application makes its job and after the end of the button´s click method I get:

    Unhandled exception at 0x90909090 in WebDev.WebServer40.exe: 0xC0000005: Access violation.

    Can you explain this?

  2. #2
    Join Date
    Jul 2012
    Posts
    90

    Re: Access Violation

    Normally, this sort of error means that something has attempted to read to or write from memory that it is not allowed to access. I'm afraid that without seeing the code that is causing the problem, I really can't get any more specific than that.

  3. #3
    Join Date
    Apr 2012
    Posts
    29

    Re: Access Violation

    Follows the code:

    rotected void Button2_Click(object sender, EventArgs e)
    {
    Session["busca_texto"] = busca.Text;

    Session["DataSource"] = ListaResultadoBusca;

    if (Session["regcge"] == null)
    Session["regcge"] = "";

    Session["DataSource"] = ListaResultadoBusca;
    GridView6.DataBind();

    MultiView1.ActiveViewIndex = 8;
    tabMenu.Items[MultiView1.ActiveViewIndex].Selected = true;
    }

  4. #4
    Join Date
    Jul 2012
    Posts
    90

    Re: Access Violation

    What type of object is ListaResultadoBusca, and why are you putting it in the Session twice (lines 5 and 10).

  5. #5
    Join Date
    Apr 2012
    Posts
    29

    Re: Access Violation

    ListaResultadoBusca is of type List<ResultadoBusca>

    I didn´t notice I was assign the session twice.

  6. #6
    Join Date
    Jul 2012
    Posts
    90

    Re: Access Violation

    I'm sorry, but I'm just not seeing anything in the code that you've shared that should cause an access problem. Perhaps it is in how the ResultadoBusca objects are populated or defined, or it could be in something else entirely. Without enough sample code to replicate the problem (so I can debug it myself) there is just no way to tell where or how the problem is coming into play.

    Sorry I couldn't be of more help.

  7. #7
    Join Date
    Apr 2012
    Posts
    29

    Re: Access Violation

    Thank you

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured