?
Solved

My web site does not always call Global.asax

Posted on 2011-02-11
9
Medium Priority
?
545 Views
Last Modified: 2012-05-11
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


0
Comment
Question by:newbieweb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 13

Assisted Solution

by:devlab2012
devlab2012 earned 800 total points
ID: 34872550
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
 
LVL 15

Expert Comment

by:jorge_toriz
ID: 34872574
Into which event are you putting your breakpoint?
0
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 1200 total points
ID: 34872622
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:newbieweb
ID: 34873413
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
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 34873444
As I said in my previous post I think you want Session_start
0
 

Author Comment

by:newbieweb
ID: 34873484
I tried making a constructor for Global, but that did not work because Contact was null.
0
 

Assisted Solution

by:newbieweb
newbieweb earned 0 total points
ID: 34873518
Sorry, I missed that...
0
 

Author Comment

by:newbieweb
ID: 34880581
I'd like this question re-opened so I can make sure my answer is not listed as having contributed to the answer.
0
 

Author Closing Comment

by:newbieweb
ID: 34904816
Thanks.
0

Featured Post

Command Line Tips and Tricks

The command line is a powerful tool at the disposal of every Linux user. Although Linux distros come with beautiful user interfaces, it's worthwhile to learn the command line because it allows you to do a number of things that you otherwise cannot do from the GUI.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question