p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

aspdotnet_website_programming thread: Object reference error when I run the project?


Message #1 by "salar golestanian" <salaro@f...> on Tue, 11 Mar 2003 18:43:09
Hi 

I just got this great book and I think I have set everything correctly.

However, running - http://localhost/ThePhileVB/Default.aspx, gives this 
error: -

         "Object reference not set to an instance of an object."

Any ideas on this please, I have gone through all the configuration files 
and configured it according to my SQL 2000 and my Laptop's configuration 
settings.

Since it does not give database error, it shows I am ok there. but I have 
never come across the above.

Any Ideas please

Salaro
Message #2 by "Salaro Gol" <salaro@f...> on Wed, 12 Mar 2003 07:49:57
I forgot to add the details of the error:-
<code>
System.NullReferenceException: Object reference not set to an instance of 
an object.
   at Wrox.WebModules.AdsManager.Data.Advertisement.RetrieveAd(Int32 
advertisementId) in 
F:\Training\ASPDotNet_WebsiteProg\ThePhileVB\WebModules\AdsManager\AdsManag
er.Data\Advertisement.vb:line 39
   at Wrox.WebModules.AdsManager.Business.Advertisement..ctor(Int32 
advertId) in 
F:\Training\ASPDotNet_WebsiteProg\ThePhileVB\WebModules\AdsManager\AdsManag
er.Business\Advertisement.vb:line 47
   at Wrox.ThePhile.Web.Controls.User.SiteFooter.Rotator_AdCreated(Object 
sender, AdCreatedEventArgs e) in 
F:\Training\ASPDotNet_WebsiteProg\ThePhileVB\Controls\User\SiteFooter.ascx.
vb:line 67
   at System.Web.UI.WebControls.AdRotator.OnAdCreated(AdCreatedEventArgs e)
   at System.Web.UI.WebControls.AdRotator.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain()

</code>

  Return to Index