Solved

RAS Server Error

Posted on 1998-08-24
4
227 Views
Last Modified: 2011-08-18
I have a program which at a certain time per day get initiated. All this program does is Shuts down the FTP, WWW and RAS Services, copies and appends all the IIS logs to one file, performs some logic to the log files and then starts the RAS, WWW and FTP service ( in that order).
Lately, once a week at random intervals, I get a RASSRV.EXE - Application Error on the NT Server 4.0 with option pack 3
The message further reads "The instruction at 0x77f88ob referenced memory at 0x00000018. The memory cannot be read.

I am using StopService() API  to Stop all services and StartService() API to start all the services. Ofcourse. a lot of other initialization is done before these API's are called.

Is this a known defect on NT Server RAS Services or is my program doing something wrong. This message usually appears when I am tryng to Start the RAS service. My Console program  is still in the wait loop for the RAS to start.

Appreciate all the help.
0
Comment
Question by:rian
[X]
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
  • 3
4 Comments
 
LVL 1

Accepted Solution

by:
gasim earned 50 total points
ID: 1171090
I have ran into similar problems stoping the RAS service and I finally gave up and used another approach to stop it and since you are running a console application then it will work for you as well.
You can Use CreateProcess API to execute the (net stop) and (net start) CMD commands. I have tried it and it works with no problems.
If you are interested in doing so below is the code for using (net stop):

#include <windows.h>

main()
{
      STARTUPINFO STARTUP_INFO;
      PROCESS_INFORMATION process_info;
      GetStartupInfo(&STARTUP_INFO);
      CreateProcess(0,"net stop \"ras server\"",0,0,FALSE,CREATE_NEW_CONSOLE,0,0,&STARTUP_INFO,&process_info);
      return;
}

0
 

Author Comment

by:rian
ID: 1171091
Thanks a lot. That worked.

0
 
LVL 1

Expert Comment

by:gasim
ID: 1171092
I'm gladd that it did.
Thank you
0
 
LVL 1

Expert Comment

by:gasim
ID: 1171093
I'm gladd that it did.
Thank you
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

734 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