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

Application restart on file change

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.
Nov 19 '05 #1
3 1875
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
----------------------------------------------------------
"Chris" <fr*******@surf.to> wrote in message
news:57**************************@posting.google.c om...
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.

Nov 19 '05 #2
Is your schema file something you could put into Cache? You could load it
on application start, place it into cache, and then use a FileDependency on
the cache object. When you change the your .xsd file, it will invalidate
and reload the file into cache.

http://msdn.microsoft.com/library/de...classtopic.asp

bill

"Chris" <fr*******@surf.to> wrote in message
news:57**************************@posting.google.c om...
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.

Nov 19 '05 #3
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/arc...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.

"Chris" <fr*******@surf.to> wrote in message
news:57**************************@posting.google.c om...
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.

Nov 19 '05 #4

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

Similar topics

3
by: alexB | last post by:
On my ASP.NET application, restarting the application through IIS doesn't always fire the Application_Start() event. Is there a trick to this? Restarting IIS is not an option since there are...
3
by: Jiong Feng | last post by:
Hi, I have a question. WE have a web application in web root. And also we have a virtual directory library application. If we change root web.config, the root application will restart....
3
by: Pint | last post by:
I would like to know if there is a programatic way to force the Application object to restart. I have a hosted website where I will be unable to control the webserver (eg:iisreset), and I would...
2
by: James Hunter Ross | last post by:
Friends, We have been experiencing unexpected Application Timeout issues in our ASP 1.1 application. We eventually read-up on aspnet_wp (or w3wp) "recycling" and various related concepts...
1
by: Jordan R. | last post by:
In order to restart and ASP.NET Web application - the only way I'm aware of is to save a change to the app's Web.config file. By "restart" I'm meaning to get the Application_Start event to fire. ...
3
by: amolkasbekar | last post by:
Hi All, I have a asp.net application that I am migrating from 1.1 to 2.0. The App runs fine in 1.1. My setup is Winxp with IIS5. However, when I run the app in 2.0, IIS is doing an 'Application...
3
by: Ray Booysen | last post by:
In our application, we merge documents for our clients. The directory structure is as follows: webroot ->bin ->Documents ->Company -> Company X
1
by: Brian Simmons | last post by:
Hi All, I know that if you modify the web.config file or any file in the App_Code subfolder, that ASP.net 2.0 will "restart" the application (i.e. clear out any sessions, etc...). Are there...
5
by: IUnknown | last post by:
Ok, we are all aware of the situation where modifying the folder structure (adding files, folders, deleting files, etc) will result in ASP.NET triggering a recompilation/restart of the application....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.