Event that runs once when server site updated?

R

Randall Parker

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?
 
T

Trevor Benedict R

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top