Solved

My web site does not always call Global.asax

Posted on 2011-02-11
9
544 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 200 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 300 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

718 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