Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / July 2003

Tip: Looking for answers? Try searching our database.

Trivial modification to web.config

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anita C - 29 Jul 2003 00:30 GMT
Hi,
Can someone please provide a code sample for:
Load the web.config for a web app and add a space at the end of it or if
there is space at the end then delete the space and then re-savethe file.
The reason for thwe above being to force a restart of the web app.
Thanks.
Dino Chiesa [MSFT] - 29 Jul 2003 23:01 GMT
you need a touch utility.  There are zillions of these on the web. Eg,
http://www.simtel.iif.hu/pub/pd/43977.html

or,
just save this into a batch file:

@echo off
setlocal
set r=%date%.%time%.%random%
@set r=%r:/=-%
@set r=%r: =-%
@set r=%r::=%

::may need to select the appropriate app directory here

::save current version as backup
echo backing up current web.config  in web.config.%r%
copy web.config web.config.%r%  >nul

::This line copies a file back onto itself, updating the timestamp
copy web.config + ,,  >nul

endlocal

> Hi,
> Can someone please provide a code sample for:
> Load the web.config for a web app and add a space at the end of it or if
> there is space at the end then delete the space and then re-savethe file.
> The reason for thwe above being to force a restart of the web app.
> Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.