Solved

My web site does not always call Global.asax

Posted on 2011-02-11
9
540 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
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
 

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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Needing an event fired when a row is added on a datagridview 4 36
DateTimepicker 4 33
Angular JS Route 3 47
rest webservice call over https via c# 6 21
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

912 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now