473,320 Members | 1,884 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,320 software developers and data experts.

Event that runs once when server site updated?

Is there an event that will run once when either we tell IIS that we've changed the
source code for the site or when the server reboots?

What I'm trying to do: I want to have a file that tells my .aspx.cs files which
database to connect to. I do not want to use web.config (if that is even possible).

Ideally I'd like some global object accessible from Page_Load to be able to return a
database name string in some method call into that object to look up the property.

I'd rather not open the settings file every time there is a page load. Seems like a
bit of overhead that ought to be avoidable.

Any suggestions on how to approach this?
Feb 8 '06 #1
2 1051
On Application Start event in global.aspx code behind

SA

"Randall Parker" <NOtechieSPAMpundit_please@future_avoidjunk_pundit .com>
wrote in message news:uV**************@TK2MSFTNGP14.phx.gbl...
Is there an event that will run once when either we tell IIS that we've
changed the source code for the site or when the server reboots?

What I'm trying to do: I want to have a file that tells my .aspx.cs files
which database to connect to. I do not want to use web.config (if that is
even possible).

Ideally I'd like some global object accessible from Page_Load to be able
to return a database name string in some method call into that object to
look up the property.

I'd rather not open the settings file every time there is a page load.
Seems like a bit of overhead that ought to be avoidable.

Any suggestions on how to approach this?

Feb 8 '06 #2
Any change to the Web.Config file will recycle the application. Meaning, I
can safely cache the information in the Web.Config file. As a Programmer
(MS) why would I read it everytime, I would most probably cache it. You can
use FileMon to see how the Web.Config file is used. It would probably be
cached. Just to lazy to test this out right now.

Regards,

Trevor Benedict R
MCSD
"Randall Parker" <NOtechieSPAMpundit_please@future_avoidjunk_pundit .com>
wrote in message news:uV**************@TK2MSFTNGP14.phx.gbl...
Is there an event that will run once when either we tell IIS that we've
changed the source code for the site or when the server reboots?

What I'm trying to do: I want to have a file that tells my .aspx.cs files
which database to connect to. I do not want to use web.config (if that is
even possible).

Ideally I'd like some global object accessible from Page_Load to be able
to return a database name string in some method call into that object to
look up the property.

I'd rather not open the settings file every time there is a page load.
Seems like a bit of overhead that ought to be avoidable.

Any suggestions on how to approach this?

Feb 8 '06 #3

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

Similar topics

2
by: dubian | last post by:
I would like to propagate an event signal to an external application when a table in my MSSql2000 server is updated. Prog A; I have an external application adding records to a table. Prog B; I...
5
by: Maxine G | last post by:
I have two forms, a menu and a data entry form. The entry form is bound to a query against linked SQL server tables. In the deactivate event, I have some code which asks the user if they want to...
2
by: Borr | last post by:
Code fragment as simple as possible : public class TestTimer : System.Web.UI.Page { protected System.Web.UI.WebControls.Label Label1; protected System.Timers.Timer timer1; private void...
10
by: Scott | last post by:
I have a simple asp.net app which works fine in debug mode, but crashes on the following line when I run it on the production server: Dim dt As DataTable I have tried the following variations...
4
by: Carlo Marchesoni | last post by:
I have a button that opens a new Window (some kind of search-window), which is fired using JavaScript (btnSearch.Attributes=".....";) Now I need to run some code behind code BEFORE this JavaScript...
1
by: Ian Lane .enizin.net> | last post by:
Hello, I am having a strange issue between my Test environment and my Production environment. The problem is my site runs beautifully on Test and almost beautifully on Production. They are both...
0
by: cherryparadise001 | last post by:
Hi All, I have moved an asp system from Window Server 2000 to Window Server 2003 recently. Many error occured and most of them are unable to get the control's value in the page. I am newbie to...
5
by: Marek | last post by:
I have web app written using VS2005 Prof. App is running on W2K Server, IIS 5.0 and ASP.NET 2.0 and Session_End event is not fired. On Windows 2003 server, IIS 6.0 and ASP.NET 2.0 this event is...
4
by: DanWeaver | last post by:
I am trying to implement a "thumbs up- down" scoring system- I have an asp: repeater control to spit to my page a series of unique data eg John Yay- 2 Nay 10 Lucy Yay- 5 Nay 12 Susie Yay- 25 Nay...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.