473,503 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

app starting method

Hi;

Is there a way to have a method called when my ASP (2.0) app is first
loaded, before any pages are loaded?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Mar 12 '06 #1
9 1055
The global.asax's or HttpModules Application_start is the earliest method
you can hook into.

Karl

--
http://www.openmymind.net/

"David Thielen" <th*****@nospam.nospam> wrote in message
news:63**********************************@microsof t.com...
Hi;

Is there a way to have a method called when my ASP (2.0) app is first
loaded, before any pages are loaded?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Mar 12 '06 #2
Thanks for Karl's informative inputs.

Hi Dave,

As Karl has mentioned, you can consider using the Application_Start event
of the Global.asax. Also, this event get fired when an ASP.NET
application's appdomain has been initialized and begin to process requests.
However, since this event is fired only once per application, and it is not
page or foreground UI specific, we should not put any page or request or
front UI specific code in it.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Mar 13 '06 #3
Hi;

I understand. I use this to initialize our reporting engine - before any
page request comes in.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

"Steven Cheng[MSFT]" wrote:
Thanks for Karl's informative inputs.

Hi Dave,

As Karl has mentioned, you can consider using the Application_Start event
of the Global.asax. Also, this event get fired when an ASP.NET
application's appdomain has been initialized and begin to process requests.
However, since this event is fired only once per application, and it is not
page or foreground UI specific, we should not put any page or request or
front UI specific code in it.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Mar 13 '06 #4
Thanks for the response Dave,

Please feel free to post here if there is anything else we can assist.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Mar 14 '06 #5
Hi;

Every time I make a change in Global.asax then when I try to build I get the
error message:
Validating Web Site
/: Build (web): Attempted to access an unloaded AppDomain.

I have to exit and restart VS2005 to get this to stop.

Any idea what's going on?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

"Karl Seguin [MVP]" wrote:
The global.asax's or HttpModules Application_start is the earliest method
you can hook into.

Karl

--
http://www.openmymind.net/

"David Thielen" <th*****@nospam.nospam> wrote in message
news:63**********************************@microsof t.com...
Hi;

Is there a way to have a method called when my ASP (2.0) app is first
loaded, before any pages are loaded?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com


Apr 22 '06 #6
Hi;

And more - if I write some code that won't compile, then after I fix it it
sticks with the old error message until again, I exit and restart VS2005.

???

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

"David Thielen" wrote:
Hi;

Every time I make a change in Global.asax then when I try to build I get the
error message:
Validating Web Site
/: Build (web): Attempted to access an unloaded AppDomain.

I have to exit and restart VS2005 to get this to stop.

Any idea what's going on?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

"Karl Seguin [MVP]" wrote:
The global.asax's or HttpModules Application_start is the earliest method
you can hook into.

Karl

--
http://www.openmymind.net/

"David Thielen" <th*****@nospam.nospam> wrote in message
news:63**********************************@microsof t.com...
Hi;

Is there a way to have a method called when my ASP (2.0) app is first
loaded, before any pages are loaded?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com


Apr 22 '06 #7
After we change global.asax file's code , web.config , the ASP.NET
application's appdomain may get restarted, maybe some code is accessing
some field in the original domain. I suggest you try manually stop the test
webserver(if you're using VS 2005 test server to run the app), then perform
rebuild the website and run it again to see whether it helps.

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Apr 24 '06 #8
that did it - thanks

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

"Steven Cheng[MSFT]" wrote:
After we change global.asax file's code , web.config , the ASP.NET
application's appdomain may get restarted, maybe some code is accessing
some field in the original domain. I suggest you try manually stop the test
webserver(if you're using VS 2005 test server to run the app), then perform
rebuild the website and run it again to see whether it helps.

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Apr 24 '06 #9
You're welcome Dave,

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Apr 25 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
2866
by: serge calderara | last post by:
Dear all, I have an application which is suppose to start another executable process. As soon as that process is running, I need to retrive its handle. The problem of the particular process I am...
4
339
by: cedric | last post by:
hello, I encounter a problem using threads. I have a simple code to use a thread : cSurveillanceBorne = New clsThreadSurveillance _SurveillanceThread = New Thread(AddressOf...
2
3349
by: Rajesh Abraham | last post by:
I have a Windows Service and in the OnStart, I am initializing the BusinessLayer Object and calling a method of the object, which normally takes about 10 mts to finish execution. Now when I...
1
1759
by: Glenn | last post by:
I have used this code successfully in a form application. I tried to add the same code in a service and have not been able to get the application to start. I have the service starting with a local...
2
2221
by: Razzie | last post by:
Hey all, I wrote a Windows Service. When I test it on my developement machine (winXP) it works fine. It starts ok, never crashes, etc. When I install the service on another machine (win2000) it...
0
2793
by: tshad | last post by:
I have a Windows Service I created that just sets a timer and writes to EventLog every 10 seconds. It installed fine and it actually starts. But it says it doesn't. The progress bar shows the...
1
9584
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
6
4151
by: Arnie | last post by:
We're using the ServiceController class provided by the .NET Framework, programming in C#. We are using the Start() method to start a service from another service. This works fine most of the...
6
1536
by: rlueneberg | last post by:
Can someone tell if Sitemap always require a starting root? Can it have more than one root? I am having a problem trying to hide a root node without hiding its children using a Treeview component....
7
1738
by: Joseph Geretz | last post by:
I have a Service which runs OK, but I'm abviously not starting it properly. In my OnStart event I commence a long running process which polls a database table and performs various processing. Since...
0
7074
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7322
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6982
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4667
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3161
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1501
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.