Question:
Why do I get this server error message on a contest site?
veggie g
2008-11-18 11:25:08 UTC
I tried to vote on a contest website but keep getting this msg. What's up with this?

Server Error in '/' 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 54:
Line 55: WSA.Services.MediaService mediaService = new MediaService();
Line 56: mediaService.Increment_Number_Of_Views(media.Id, (Session["User"] != null) ? System.Convert.ToInt32(Session["UserID"]) : 0);
Line 57:
Line 58: this.assetTitle.Text = media.Title.ToString();
Five answers:
2008-11-18 11:28:42 UTC
This is a problem with the website not your pc



Inform the person who runs the website thats all you can do
2008-11-18 11:38:50 UTC
Something in the code in those lines is incorrect. As zabouth said, the person who wrote that script has to fix it. (If you haven't logged into the site, Session["UserID"] might be null, causing System.Convert.ToInt32 to blow up. Which should give you a polite message about logging in, not an error barf. Or it could be something else.)
2008
2008-11-18 11:29:19 UTC
That's what would happen when you use Internet Explorer, try to download Mozilla Fire-Fox or Opera.
Anthony
2008-11-18 11:31:42 UTC
This is a Database problem, (theirs) you dont have to worry about this unless this is your site.
2008-11-18 11:51:45 UTC
graphics design-

http://userstyle.org/


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...