Application restart on file change

C

Chris

I have a schema file that is loaded in the application_onstart event.
Is there a way to make the appliaction restart and fire the event
again if the xsd file is changed in the same way as when web.config
changes? I can't find any section of web.config where I can add this
dependency.
 
A

Alvin Bruney [MVP]

I don't think you can set a restart dependency in this way. The application
restart is intended for specific application files. But one approach is to
set a cache dependency on the xsd file and pass a callback function that
either attempts to unload the application domain or makes an immaterial
change to the web config file

--
Regards,
Alvin Bruney [Microsoft MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ http://www.lulu.com/owc
 
O

Ollie Riches

Bill's post sounds the most appropriate way to achieve what you want, but if
you still need to it the other way you could use the info in the following
link to achieve what you want, but it is messy and bit of a hack and will
definitely require you change the security settings for the website which
you should try and avoid where possible IMHO.

http://weblogs.asp.net/ca4ukinwa/archive/2004/12/01/273301.aspx


--
HTH

Ollie Riches
http://www.phoneanalyser.net

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a programmer
helping programmers.
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top