My web site does not always call Global.asax

Unless I specifically rebuild my website, upon running the application from Visual Studio, the line of command does not stop at a breakpoint in the Global.asax file. It's like the object is in memory and the code is ignored.


Can someone please explain this to me?

Thanks,
newbieweb


newbiewebSr. Software EngineerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Paul JacksonConnect With a Mentor Software EngineerCommented:
Sounds like you are using the Application_Start event which only runs the first time the applciation starts try using the session_start event instead
0
 
devlab2012Connect With a Mentor Commented:
When you run website from visual studio, it is run under ASP.NET Development Server. See the small icon at the bottom right of the window. You have to stop the application from there and then restart it from visual studio. Otherwise if you simply stop from visual studio window, application is still running in ASP.NET Development Server.
0
 
jorge_torizResearch & Development ManagerCommented:
Into which event are you putting your breakpoint?
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
newbiewebSr. Software EngineerAuthor Commented:
Yes, I was using Application_Start. But I want it called each time I start. I now understand (from the first post) why it was only hitting in Application_Start after I recompiled. But I'd like to use a method where I do not need to stop the integrated dev. environment. What property gets called each time I start the website, regardless of whether I am running from VS or not?

0
 
Paul JacksonSoftware EngineerCommented:
As I said in my previous post I think you want Session_start
0
 
newbiewebSr. Software EngineerAuthor Commented:
I tried making a constructor for Global, but that did not work because Contact was null.
0
 
newbiewebConnect With a Mentor Sr. Software EngineerAuthor Commented:
Sorry, I missed that...
0
 
newbiewebSr. Software EngineerAuthor Commented:
I'd like this question re-opened so I can make sure my answer is not listed as having contributed to the answer.
0
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.