I get it when I log in as a user, put something in the shopping cart, and then log out without purchasing. Then when I re-run the browser, I am still logged in. If I click the contact menu item, I get that error. If I empty the shopping cart, the error goes
away. After its published, will it give such errors if a user goes away leaving items in their cart without purchasing?
Server Error in '/MyWebSite' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 12: <small>
Line 13: <asp:Image runat="Server" ID="imgProduct" ImageUrl="~/Images/ArrowR3.gif" GenerateEmptyAlternateText="true" /> Line 14: <%# Eval("Title") %> - <%# (this.Page as BasePage).FormatPrice(Eval("UnitPrice")) %> <small>(<%# Eval("Quantity") %>)
Line 15: <br /></small>
Line 16: </ItemTemplate>
Yes. I clicked each of the menu items that come with the original set up, "home', forums, store, and each one works except the "Contact" link. It throws that error up above. Its only if something is left in shopping cart when I close the browser and then I
reopen the browser. It reopens with me still logged in even tho I didn't click to keep me logged in. Of course I didn't click "log out" either. Maybe you could try that and see if it happens. I put something in the cart, then don't complete purchase and then
close browser. Then I run it again in browser from default page and clicked all the different menu headers.
RaeKC
Member
101 Points
366 Posts
Why am I getting this error ??
Feb 14, 2009 06:40 PM|LINK
Server Error in '/MyWebSite' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 12: <small>
Line 13: <asp:Image runat="Server" ID="imgProduct" ImageUrl="~/Images/ArrowR3.gif" GenerateEmptyAlternateText="true" />
Line 14: <%# Eval("Title") %> - <%# (this.Page as BasePage).FormatPrice(Eval("UnitPrice")) %> <small>(<%# Eval("Quantity") %>)
Line 15: <br /></small>
Line 16: </ItemTemplate>
Source File: c:\My Documents\MyWebSite\Controls\ShoppingCartBox.ascx Line: 14
Rachel
Lee Dumond
Contributor
6404 Points
1173 Posts
Re: Why am I getting this error ??
Feb 15, 2009 05:33 PM|LINK
When you say "the contact menu item", do you mean the Contact link in the Main menu?
Does this happen when you navigate to any other pages, or just that one?
Follow Me on Twitter
RaeKC
Member
101 Points
366 Posts
Re: Why am I getting this error ??
Feb 16, 2009 01:36 AM|LINK
Hi Lee:
Yes. I clicked each of the menu items that come with the original set up, "home', forums, store, and each one works except the "Contact" link. It throws that error up above. Its only if something is left in shopping cart when I close the browser and then I reopen the browser. It reopens with me still logged in even tho I didn't click to keep me logged in. Of course I didn't click "log out" either. Maybe you could try that and see if it happens. I put something in the cart, then don't complete purchase and then close browser. Then I run it again in browser from default page and clicked all the different menu headers.
Rachel
Lee Dumond
Contributor
6404 Points
1173 Posts
Re: Why am I getting this error ??
Feb 17, 2009 08:57 PM|LINK
Did you do a debug on this?
Follow Me on Twitter
RaeKC
Member
101 Points
366 Posts
Re: Why am I getting this error ??
Feb 19, 2009 02:41 PM|LINK
Hi Lee:
I need to check on that.
Rachel