troubleshooting Question

Web app works in Debug mode, not otherwise

Avatar of SeTech
SeTechFlag for United States of America asked on
.NET ProgrammingC#ASP.NET
15 Comments2 Solutions509 ViewsLast Modified:
I asked a question about this a few months back, and it ended up off on a tangent. However, I'm having the problem again, and I need to get this resolved.

I have a web app (C#, and ASP.Net 2.0 developed using Visual Studio 2005), and in the Global.asax Session_Start event, I am calling a number of methods from a Class Library my unit developed to populate Session variables that are used throughout the app. The app physically resides on a web server, so after compiling/building the site, we access it using IE and the virtual directory that's set up using IIS.

Here's where it gets frustrating. After building the site and trying to access it, I get an error message thrown from Default.aspx's code-behind, in essence saying that a Session variable I populated in Global.asax is null (that's my translation of the error code put in context). So wondering if I messed it up somehow, I put a Debug breakpoint in the Session_Start method in Global.asax and stepped through the whole method, only to see it work perfectly, and the IE window it brought up while debugging displays the page just like it should. But if I just put the virtual address in IE and try to access it normally, I still get the error.

So why can I get the page to work in Debug mode, but not normally?
ASKER CERTIFIED SOLUTION
SeTech
Analyst

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 15 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros