I have a web application that is working great while running form VS, but once it’s published trying to navigate to the site throws a NullRefernceException. Here is the stack trace:
[NullReferenceException: Object reference not set to an instance of an object.]
DAL.VendorRepDAL.GetRepsInfo(List`1 fields) in C:\Users\mfoster\Desktop\EventPlanner\DAL\DAL.vb:649
EventPlanner.DealEntry.LoadData() in C:\Users\mfoster\Desktop\EventPlanner\EventPlanner\deals.aspx.vb:31
System.Web.UI.Control.LoadRecursive() +70
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3063
I think the problem may have something to do with the fact that file paths in the stack trace are referencing my hard drive for some reason. If that’s the case I’m not how to fix it.
Thanks For any help.
Sherlock Holmes might deduce that since this error comes from a class named DAL, either:
The rest of us, however, might need to see a bit more code, such as the
GetRepsInfomethod that seems to be throwing.Common causes and fixes for
NullReferenceExceptioncan be found here: What is a NullReferenceException, and how do I fix it?