Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

how can i change error files by script?

 
   Web Hosting and Web Master Forums (Home) -> IIS RSS
Next:  IIS Caching  
Author Message
ntnewsno

External


Since: Feb 11, 2004
Posts: 2



(Msg. 1) Posted: Thu Feb 12, 2004 1:57 am
Post subject: how can i change error files by script?
Archived from groups: microsoft>public>inetserver>iis (more info?)

hi

we are using our own error pages. now i must configure this on many many
virtual sites on different servers and i'd like to script this...
how is this possible?

i need this for Windows 2000 Server SP4 and Windows 2003 Standard Server...


Greetings
Alex

 >> Stay informed about: how can i change error files by script? 
Back to top
Login to vote
someone9

External


Since: Aug 25, 2003
Posts: 2419



(Msg. 2) Posted: Thu Feb 12, 2004 1:58 am
Post subject: Re: how can i change error files by script? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I'd suggest using ADSUTIL.VBS (with one hack -- change its max-number of
commandline parameters from 9 to something larger), as well as the
documentation for the HttpErrors property on MSDN.

ADSUTIL.VBS SET W3SVC/1/ROOT/HttpErrors "404,*,URL,/404.htm"
"404,2,FILE,C:\Errors\404-2.htm"

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Alex" <ntnewsNO RemoveThis @SPAM.hrz3.hrz.tu-darmstadt.de> wrote in message
news:OR7geoO8DHA.1816@TK2MSFTNGP12.phx.gbl...
hi

we are using our own error pages. now i must configure this on many many
virtual sites on different servers and i'd like to script this...
how is this possible?

i need this for Windows 2000 Server SP4 and Windows 2003 Standard Server...


Greetings
Alex

 >> Stay informed about: how can i change error files by script? 
Back to top
Login to vote
ntnewsno

External


Since: Feb 11, 2004
Posts: 2



(Msg. 3) Posted: Thu Feb 12, 2004 5:01 am
Post subject: Re: how can i change error files by script? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

David Wang [Msft] wrote:

 > I'd suggest using ADSUTIL.VBS (with one hack -- change its max-number of
 > commandline parameters from 9 to something larger), as well as the
 > documentation for the HttpErrors property on MSDN.
 >
 > ADSUTIL.VBS SET W3SVC/1/ROOT/HttpErrors "404,*,URL,/404.htm"
 > "404,2,FILE,C:\Errors\404-2.htm"
 >

hm... i don't like to kill my metabase with a programming error Smile...
isn't there anything ready for use?


Alex<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: how can i change error files by script? 
Back to top
Login to vote
someone9

External


Since: Aug 25, 2003
Posts: 2419



(Msg. 4) Posted: Thu Feb 12, 2004 5:01 am
Post subject: Re: how can i change error files by script? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Sorry, I'm not aware of any "ready for use". It is pretty simple to write
one, and ADSUTIL is pretty safe when you don't know how to write one but can
give the right input parameters and know what you are doing (that one
character change in code as I had suggested is needed if you plan to specify
 >9 CustomError definitions at a time).

For example, I gave an example that safely edits custom errors for the
default website to only have two defined entries. If you need to define
more, just add more strings at the end of the command.

You DO have backups of your metabase, correct? If you do, this is quite
harmless -- I always backup the metabase at known "good" values, I can screw
it up however I want, and I can just run:
NET STOP /y IISADMIN
COPY /y BackedUpMetabase %SYSTEMROOT%\System32\inetsrv\metabase.bin (or
metabase.xml for IIS6)
NET START W3SVC

And everything is back to normal

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Alex" <ntnewsNO.TakeThisOut@SPAM.hrz3.hrz.tu-darmstadt.de> wrote in message
news:eVQtMPQ8DHA.1504@TK2MSFTNGP12.phx.gbl...
David Wang [Msft] wrote:

 > I'd suggest using ADSUTIL.VBS (with one hack -- change its max-number of
 > commandline parameters from 9 to something larger), as well as the
 > documentation for the HttpErrors property on MSDN.
 >
 > ADSUTIL.VBS SET W3SVC/1/ROOT/HttpErrors "404,*,URL,/404.htm"
 > "404,2,FILE,C:\Errors\404-2.htm"
 >

hm... i don't like to kill my metabase with a programming error Smile...
isn't there anything ready for use?


Alex<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: how can i change error files by script? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Script to change port assignment - I am looking for a script that will change the Default Web Site port from 80 to 4080. My ISP blocks Port 80 and I have to manually change the number back abd forth to be able to hit it from the outside. Thanks, Timothy Thibodaux

500 error after IP change - for about 18 months i have been using the same static ip to host my organizations IIS server, recently i bought a new block of ip's and dumped my old one to save on costs, with this ip change i have switched all the webs ips to the new ones, double..

IIS Password change error - hi guys, I somehow can't open the password site anymore, I always get the following error: Serverobject, ASP 0196 (0x80040154) You should only use InProc-Servercomponents. If you want to use Local-Servercomponents, you need to change the..

Script Error - I am trying to do an insert and keep getting the error ... "Operation needs an updateable query". The query seems OK .. what could be the cause of this? Thanks in advance.

Script error - have been getting these ongoing and I went to the advance tab and that box is not checked any other suggestions . Thanks
   Web Hosting and Web Master Forums (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]