Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8254267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:07:54+00:00 2026-06-08T01:07:54+00:00

I have a Windows 2003 Server that uses IIS to host a legacy ASP.NET

  • 0

I have a Windows 2003 Server that uses IIS to host a legacy ASP.NET web service that connects to a database on a remote Oracle database server that I have no control over. The problem is that the database server goes down every week or two, but then comes back up after about 5 minutes. I have to then restart IIS to remove any corrupt connections before my web service works again.

What is the best way to trigger an event (i.e. email myself and/or reset IIS) when a specific error code occurs (in this case it will be an ORA- type error, but I can get the Windows error code)?

IIS Setting?

Task Scheduler? (limited to scheduled tasks only I believe on Windows 2003 server, eg. per day/week/month etc)

Powershell Script?

Other options?

I know in Windows 2008 Server that you can configure the Task Scheduler to trigger an event when the server experiences certain error codes in its Error Log… but I can’t find anything like this in the Task Scheduler of Windows 2003 Server.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:07:56+00:00Added an answer on June 8, 2026 at 1:07 am

    I wrote a powershell shell script to monitor the sql server errorlog and report on specific errors. I stored where I last stop reading and then continued on from that point the next time I ran the script. This is the part that actually reads the log. Then you just need to store the position in some temp file and run this as a scheduled task. And send an email if the error occurs or even restart some service.

    $path = $logs.file
    Write-Host $path
    if($currentLog.lastpos -ne $null){$pos = $currentLog.lastpos}
    else{$pos = 0}
    if($logs.enc -eq $null){$br = New-Object System.IO.BinaryReader([System.IO.File]::Open($path, [System.IO.FileMode]::Open, [System.IO.FileAccess]::Read, [System.IO.FileShare]::ReadWrite))}
    else{
        $encoding = $logs.enc.toUpper().Replace('-','')
        if($encoding -eq 'UTF16'){$encoding = 'Unicode'}
        $br = New-Object System.IO.BinaryReader([System.IO.File]::Open($path, [System.IO.FileMode]::Open, [System.IO.FileAccess]::Read, [System.IO.FileShare]::ReadWrite), [System.Text.Encoding]::$encoding)
    }
    $required = $br.BaseStream.Length - $pos
    if($required -lt 0){
        $pos = 0
        $required = $br.BaseStream.Length
    }
    if($required -eq 0){$br.close(); return $null}
    $br.BaseStream.Seek($pos, [System.IO.SeekOrigin]::Begin)|Out-Null
    $bytes = $br.ReadBytes($required)
    $result = [System.Text.Encoding]::Unicode.GetString($bytes)
    $split = $result.Split("`n")
    foreach($s in $split)
    {
        if($s.contains("  Error:"))
        {
            #Filter events here
        }
    }
    $currentLog.lastpos = $br.BaseStream.Position 
    $br.close()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I Have an asp.net web service that uses an oracle database. It works when
I have a Windows Server 2003 that is running IIS 6 with several web
I have an iis server on a windows 2003 production machine that will not
I have a windows 2003 server (WEb edition) which has .net 3.5 sp1 installed
I have a windows service (currently running under Windows 2003 Server) that needs to
I have a ASP.NET application that connects to a SQL server backend on another
I have a Windows 2003 DNS server that forwards on to OpenDNS. I want
I have a Windows Server 2003 system that is used for terminal services. We
I have just installed that latest stable release of TortoiseSVN on Windows Server 2003
I have a Windows 2003 Server with IIS, I installed VisualSVN Server on it.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.