I've deployed my site to my server, and everything works fine...EXCEPT for two pages which throw me a nice yellow
"Object reference not set to an instance of an object."
The first line of the stack trace reveals that somewhere along the lines for those two pages, it's still looking for something on my local PC:
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
MyProject.calendar.calendar.calmaincalendar_DayRender(Object sender, DayRenderEventArgs e) in C:\Users\myuser\MyProject\calendar\calendar.aspx.cs:248
The path it spits out there is on my development machine. There is seemingly no reason that this should be happening on the web server, and the even more curious thing is why it is only happening with two pages.
I have re-built and re-published with my configuration setting as Release. This isn't a new project either --- this was just a routine update local --> publish remote, and I didn't do anything out of the ordinary.
Question: how did this happen, and how can I fix it?
This is not the server looking for something on your local machine, but rather the stack-trace showing you debug information specific to the source it was compiled from.
Check your source file calendar.aspx.cs at line 248, there's an object there that (when executed on the server) is indeed null.