-
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?
-
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.
-
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;
}
-
Re: Access Violation
What type of object is ListaResultadoBusca, and why are you putting it in the Session twice (lines 5 and 10).
-
Re: Access Violation
ListaResultadoBusca is of type List<ResultadoBusca>
I didn´t notice I was assign the session twice.
-
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.
-
Re: Access Violation