?
Solved

Program will not run as scheduled event

Posted on 2004-10-29
10
Medium Priority
?
362 Views
Last Modified: 2008-02-26
I have a program that parses several files and writes them to an MS SQL database. I have insert debug statements everywhere at  this point to try to determine the problem, but with no luck. When I run the program on the server, it runs perfectly. I then schedule the program to run using windows scheduler and it fails everytime. It is currently located in the c:\Winnt\ directory, and it is an .exe program. the error I receive is as follows, I woiuld appreciate any help.:



The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: .NET Runtime version 1.1.4322.2032- ParseInventory.exe - Common Language Runtime Debugging Services: Application has generated an exception that could not be handled.

Process id=0x1394 (5012), Thread id=0x1348 (4936).

Click OK to terminate the application.
Click CANCEL to debug the application..
0
Comment
Question by:CJSantora
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 6

Expert Comment

by:ryerras
ID: 12445696
This article should help you out. Pay attention to DCOM settings configurations

http://support.microsoft.com/default.aspx?scid=kb;en-us;833977&Product=vsnet#3a
0
 

Author Comment

by:CJSantora
ID: 12445741
Here is some additional debugging if it helps anyone with this problem:

An unhandled exception of type 'System.Security.SecurityException' occurred in mscorlib.dll

Additional information: Request for the permission of type System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
0
 
LVL 6

Expert Comment

by:ryerras
ID: 12445996
Hmm. It is certainly some permissions issue. Configure the permission according to your situation


(1) Open "Control Panel".
(2) Open the "Administrative Tools" folder.
(3) Double-click "Microsoft .NET Framework Configuration".
(4) There you must change the "Runtime Security Policy" if you want to

0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 11

Expert Comment

by:rdrunner
ID: 12446367
When you scedule a task to run it will be executed as the local system account

This means you wont be able to access network shares or use integrated security to connect o the DB...

Hope this helps
0
 
LVL 11

Expert Comment

by:rdrunner
ID: 12446382
P.s.:

Of course you can also configure who is executing the task... But this depends on the OS you use..
0
 

Author Comment

by:CJSantora
ID: 12446424
This is definitely a problem, the script needs to access network shares, is there a solution to this.
0
 
LVL 11

Expert Comment

by:rdrunner
ID: 12446524
Yes

You can define under which account the task gets started. Reightclick on the task under XP and goto its properties. There should be a user account. If you dont use XP i think you need to change the account which the tasksceduler is running.

Also use UNC names and not mapped drive letters when you try to access the files
0
 
LVL 5

Accepted Solution

by:
ajitanand earned 2000 total points
ID: 12460803
1. Open Task Scheduler
2. Right Click the Task -> Properties -> Key in the information: Run As + Set Password - to the user that has enuff rights required by the application, i.e. the local admin account is one such choice.

hope this helps,
Ajit Anand
0
 

Author Comment

by:CJSantora
ID: 12461545
Thank you for your sggestion, that seems to have resolve dthe problem.
CJSantora
0
 
LVL 11

Expert Comment

by:rdrunner
ID: 12461629
What was wrong with my answers?

0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Question has a verified solution.

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

In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
The PowerShell Core 6.0 of .NET release is just the beginning. The upcoming PowerShell Core 6.1 would have artificial intelligence and internet of things capabilities. So many things to look forward to in the upcoming release.
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
If you are looking for an automated solution for backup single or multiple Office 365 user mailboxes to Outlook data file, then you can use Kernel Office 365 Backup & Restore tool. Go through the video to check out the steps to backup single or mult…

601 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