IISRESET from web page

Posted on 2014-11-05
Medium Priority
Last Modified: 2015-04-26
Hi Experts,
It happens quite often that my web page displays the error message below:

Provider error '8000ffff'
Catastrophic failure

The only way I can fix this is by resetting the IIS with the following command:

I am using Classic ASP.
I was wondering if the IIS could be reset automatically from the web page whenever the Catastrophic failure error appears.

Thank you for your help.
Question by:romsom
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +1
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 40424427
What type of connection string  and database are you using?  What time of info are you getting (just text or images/blobs??  

Is there a specific place in your code?  Just one page or random?


Author Comment

ID: 40424441
I get this error only when I return values from Teradata.
The query is quite complex and sometimes it causes the page time out. It's supposed to return real time data from different Data Warehouse tables.
This is the  connection string I'm using:
DSN=Teradata;DRIVER={Teradata};UID=ABCDEF;PWD=pw123456;Persist Security Info=True;
LVL 34

Expert Comment

by:Paul MacDonald
ID: 40424451
While it may be possible to do the IISReset from within the codebehind, it probably makes more sense to fix the problem.

As previously noted, is there any pattern to this behavior?  Is it daily?  Weekly?  Random?

Are there tasks being performed when the problem occurs?  Hitting a database?  Accessing an SSL page?  Etc...

What version of IIS are you running on?
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 34

Assisted Solution

by:Paul MacDonald
Paul MacDonald earned 1000 total points
ID: 40424458
Perhaps if you specified a timeout for the query?

DSN=Teradata;DRIVER={Teradata};UID=ABCDEF;PWD=pw123456;Persist Security Info=True; default command timeout=60; Connection Timeout=60;

...or something like that?

Author Comment

ID: 40424482
I've tried to increase the timeout but that didn't change the situation.
I get the Catastrophic Failure message about twice a month, but ironically almost always on my days off.
The page where the error message appears returns data from a Teradata database, and I guess it happens when too many users are querying the database at the same time.
I don't have codebehind, because I'm using Classic ASP. I am just curious if there is a piece of code that would automatically reset the IIS without me having to remote into the server and type IISRESET into the command prompt.
LVL 53

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 500 total points
ID: 40424511
What about experimenting without using a DSN connection.

Provider=TDOLEDB;Data Source=myServerAddress;Persist Security Info=True;
User ID=myUsername;Password=myPassword;Session Mode=ANSI;

Open in new window


Author Comment

ID: 40424554
I've tried the connections string but this is the error I get:

ADODB.Connection error '800a0e7a'

Provider cannot be found. It may not be properly installed.
LVL 34

Assisted Solution

by:Paul MacDonald
Paul MacDonald earned 1000 total points
ID: 40424729
I don't understand why an IISReset would fix a data access issue, other than to clear the error on the page itself.  A "Back" button could do that...

That said, can you try to trap the exception and re-run the query if the problem happens?

(Codebehind also refers to code inline...at least in this shop)
LVL 33

Accepted Solution

Big Monty earned 500 total points
ID: 40424737
to perform an actual IISRESET from an asp page, have your link or whatever go to an asp page with the following code in it:

Server.CreateObject("WSCript.Shell").Run "cmd.exe /c iisreset /reboot"

Open in new window

you may want to put it in its own folder with Anonymous access disabled if your site is a public site, otherwise anyone would be able to reset the site, and I'm guessing you don't want that :)

I agree with the others in this post, this is just a band aid to the problem, best to find the actual issue causing the problem....

Author Comment

ID: 40424779
Thank you very much for your help and advise.
Fixing the problem makes more sense than just rebooting the server when it happens.
I've found some connections left open, maybe that's what caused the "Catastrophic Failure".

Author Comment

ID: 40424784
I'm sorry; I meant to award the points equally for the three of you.

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question