473,326 Members | 2,013 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,326 software developers and data experts.

Trivial modification to web.config

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.
Nov 11 '05 #1
1 1282
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

"Anita C" <an****@ptm-software.com> wrote in message
news:uq*************@TK2MSFTNGP11.phx.gbl...
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.

Nov 11 '05 #2

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

Similar topics

3
by: stan | last post by:
I am working on some documentation in html format and I would really like to display the date the html file, itself was modified. I am writing my documentation in vi and the html server involved is...
0
by: BolineC | last post by:
It appears that I cannot use the Data Application Block without using the Configuration application block. Is there an easy way to modify the configuration application block to talk to something...
3
by: marfi95 | last post by:
This is probably not the correct usegroup, so I apologize up front. I'm using a FileWatcher object to trap changes on some user config files we store on a shared lan drive. When I recognize the...
3
by: baibaichen | last post by:
hi, i am reading a C++ book, it mentions a term non-trivial object. what i understand is: if a object has: a) trivial constructor b) trivial assignment operator c) trivial destructor then it...
2
by: VB Programmer | last post by:
When I change my "from" and "host" I get a slew of web.config messages... Here's the mailsettings... <system.net> <mailSettings> <smtp from="me@mydomain.com"> <network host="mail.mydomain.com"...
0
by: Marco Segurini | last post by:
HI, my form contains a combobox and a propertygrid control. At each string of the combobox is associated an object. When I select a string of the combobox the associated object is selected in...
3
by: MarcJoseph | last post by:
I have a database that is shared my multiple users who enter and update records on a weekly basis. Is there a way I can add a field to my main data table that will automatically generate the...
13
by: ts-dev | last post by:
Is it possible to prevent modification of a python file once its been deployed? File permissions of the OS could be used..but that doesn't seem very secure. The root of my question is verifying...
2
by: Unpopular | last post by:
void directory::modification()//??????????? { clrscr(); cout<< "\n\t @@@@@@ @@@@@ @@@@@ @@@@@@ @@@@@ @ @ @@@@@@ "; cout<< "\n\t=====@ @ @ @ @ @ @@...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.