473,385 Members | 1,329 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

When Did App Pool or Web Application Start?

I need to know from within my ASP.NET 2.0 Web Service, when the
application was started as a DateTime. The service might run on
Windows Server 2000, maybe 2003, maybe 2003 R2, maybe XP (in
development on my desktop), so it might run inside an App Pool, or it
might just be a virtual directory.

How can I get this information?

Thanks.

Feb 13 '07 #1
3 3367
Hello Lucius,

Yes, as you said, in IIS5 and IIS6, ASP.NET application(or other IIS hosted
server-side application) will have different process model. On IIS5, it
doesn't use application pool model, and use the "Protection Level" to
determine the worker process isolation model. While in IIS6, it use
application pool model, thus, any applications share the same application
pool will be hosted in the same worker process.
For your scenario, if what you want to get is the startup point of the
ASP.NET application, you can consider using the ASP.NET application(Global
object)'s Start event to capture the startup time(this event is fired only
once during an ASP.NET application's lifecycle).

#INFO: Application Instances, Application Events, and Application State in
ASP.NET
http://support.microsoft.com/kb/312607/en-us

e.g.

========================
namespace WebApplication1
{
public class Global : System.Web.HttpApplication
{

protected void Application_Start(object sender, EventArgs e)
{
//log the time here...
}
..................

========================

Also, if you need to retrieve this info out-side. You can consider writing
it into a log file or create a custom performance counter so that external
applications can also access this values.

Here is a MSDN reference and web articles which detailedly describe other
server-side events associated with ASP.NET runtime lifecycle:

#ASP.NET Application Life Cycle Overview
http://msdn2.microsoft.com/en-us/library/ms178473.aspx

http://www.eggheadcafe.com/tutorials...-a1f2-e68b28db
e836/restart-aspnet-apps-prog.aspx

http://weblogs.asp.net/scottgu/archi...14/433194.aspx

Hope helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

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

Feb 14 '07 #2
On Feb 13, 10:51 pm, lucius <luc...@newsgroup.nospamwrote:
I need to know from within my ASP.NET 2.0 Web Service, when the
application was started as a DateTime. The service might run on
Windows Server 2000, maybe 2003, maybe 2003 R2, maybe XP (in
development on my desktop), so it might run inside an App Pool, or it
might just be a virtual directory.

How can I get this information?
Create a Global.asax and set some publicly available property of type
DateTime in the "Application_Start" method...

..t

--
http://ajaxwidgets.com
Free ASP.NET Ajax Widgets NOW!

Feb 15 '07 #3
Hello Lucius,

Any further questions on this or does the information in previous replies
help you some? Please feel free to post here if there is anything else we
can help.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 19 '07 #4

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

Similar topics

9
by: Abhishek Srivastava | last post by:
Hello All, In IIS 6.0 We have a concept of worker processes and application pools. As I understand it, we can have multiple worker process per appliction pool. Each worker process is dedicated...
2
by: Lars Netzel | last post by:
Hi We have an ASP.NET application running on a Live server and we have had some problems with the Application pool beeing recycled due to heavy load on the server. The load is really not that...
3
by: Diffident | last post by:
Hi All, We are running a web application that we suspect has a bad code which is causing it to consume lots of memory and CPU cycles. We have set the application pool recycle parameters to CPU...
3
by: Jay-nospam | last post by:
Hi there, I am having trouble getting an ASP.NET web application to connect to another computer and passing the proper credentials and I hope someone can help me. I have a stand-alone Windows...
6
by: M Craig | last post by:
I'm trying to write a custom installation engine to plug into our existing build system. Some things I'm trying to do are, Create/Delete/Start/Stop Application Pools, Web Sites, and Virtual...
0
by: roni schuetz | last post by:
since a few day's i'm running around the problem that I stocked with a change i need to do. hopefully somebody here can give me a tipp which will be usefull to solve my problem. I'm using a...
44
by: Smokey Grindle | last post by:
I have a list box on my form, but I need to databind it to a data table that is a private member of the form's class... so I basically have Public Class MyForm priate m_MyTable as new datatable...
4
by: Oriane | last post by:
Hello, I will soon installed a small Ajax Asp.Net "single page" site on a client site. This page is simply polling a Asp.Net Web service, which fetchs and returns parameters (temperature, air...
1
by: kungfule | last post by:
I have a website that run on Window Server 2003, IIS 6. The problem is when I browse my website then Application Pool is stopped.!? I dont know why. Then I run ISS, start my application pool and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.