-
Object null reference in user control
Does anyone know why my code would suddenly be throwing the "Object
reference not set to an instance of an object." error?
Here it is, within a user control that's used by another page:
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
Source Error:
Line 11: kuamcom.Data.DataAccessTier data = new
kuamcom.Data.DataAccessTier();
Line 12: DataSet ds = data.GetHomepageNewsHeadlines();
Line 13: rptNews.DataSource = ds.Tables[1].DefaultView; // the
faulty line
Line 14: rptNews.DataBind();
This works perfectly with an ASP.NET 1.0 server at home, but when I deployed
it to a production server, it started throwing this error. Any ideas? I
did some testing and it seems to be the DataSet object referenced with
"ds.Tables[1].DefaultView;"
Thanks!
-
Re: Object null reference in user control
Never mind...I figured it out. It was a write permission error.
jas
"Jason Salas" <jason@kuam.com> wrote in message
news:3f3f2630@tnews.web.devx.com...
> Does anyone know why my code would suddenly be throwing the "Object
> reference not set to an instance of an object." error?
>
> Here it is, within a user control that's used by another page:
>
>
> Exception Details: System.NullReferenceException: Object reference not set
> to an instance of an object.
> Source Error:
> Line 11: kuamcom.Data.DataAccessTier data = new
> kuamcom.Data.DataAccessTier();
> Line 12: DataSet ds = data.GetHomepageNewsHeadlines();
> Line 13: rptNews.DataSource = ds.Tables[1].DefaultView; // the
> faulty line
> Line 14: rptNews.DataBind();
>
>
> This works perfectly with an ASP.NET 1.0 server at home, but when I
deployed
> it to a production server, it started throwing this error. Any ideas? I
> did some testing and it seems to be the DataSet object referenced with
> "ds.Tables[1].DefaultView;"
>
> Thanks!
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|