Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Program will not run as scheduled event

Posted on 2004-10-29
10
Medium Priority
?
360 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
[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
  • 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

636 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