By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,588 Members | 1,920 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,588 IT Pros & Developers. It's quick & easy.

Event that runs once when server site updated?

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.