Solved

Problems when running VB.NET app as a scheduled task

Posted on 2004-10-29
2,044 Views
Last Modified: 2012-05-05

I have a Scheduled Task that runs a VB.NET program on a daily basis, however whenever it tries to run it as scheduled It fails with 0xe0434f4d and the following event is available in the Application Log.

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.0.3705.0- vBasementDataLink.exe - Common Language Runtime Debugging Services: Application has generated an exception that could not be handled.

Process id=0x2cc (716), Thread id=0x67c (1660).

Whenever I try to run this program myself it works fine. Any suggestions?

Thanks in advance,

Alex.
0
Question by:kapowuk
    9 Comments
     
    LVL 5

    Expert Comment

    by:Ignacio Soler Garcia
    I think that this happens because you haven't registered all the .dll used by the application. If you don't have them registered but are in the same dir as the binary usually there is no problem (that explains why you can run the app). Maybe when its run as a scheduled task It can't look at the app dir to check the dlls.

    To register the dlls used by the app just use regsvr32 <dllname.dll>

    If this is not the problem just tell me and we will continue on this...
    0
     

    Author Comment

    by:kapowuk
    I'm a novice, this is my first app after moving up from VB 6

    I thought DLLs don't need to be registered with VB.NET, they are all sitting in the same directory as the app. Anyway these aren't DLLs which you can regsvr32, you just get an error if you try - I read something about the global assembly cache, should I be doing something with that?

    Cheers

    0
     

    Author Comment

    by:kapowuk
    I think these DLLs were written in .NET if that helps!
    0
     
    LVL 5

    Expert Comment

    by:Ignacio Soler Garcia
    Okok, forgget it. I was talking about third party dlls, not the ones created with vb.net. Have you added external references to your project?
    0
     

    Author Comment

    by:kapowuk
    Yep, well they're referenced in the Project if that's what you mean
    0
     
    LVL 69

    Accepted Solution

    by:
    Are you trying to access a resource that may only be visible to a log user (a mapped drive for example) ?
    0
     

    Author Comment

    by:kapowuk
    Nope everythings in in c:\foldername with Everyone readwritemodify attributes
    0
     
    LVL 5

    Expert Comment

    by:Ignacio Soler Garcia
    No, I mean if you have added references to libraries from others ...
    0
     

    Author Comment

    by:kapowuk
    I went back and thought about the mapped drives and realised that one of the DDLs im using looks for a mapped path which obviously won't exist when the task runs - anyway i moved the schedule task to that server and now it runs OK - I appreciate all your help
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Course: MongoDB Object-Document Mapper for NodeJS

    NodeJS (JavaScript on the server) is awesome, but some developers get confused about NoSQL when it comes to working in Node with MongoDB (NoSQL database). Do you need a better explanation of how to use Node.js with MongoDB? The most popular choice is the Mongoose library.

    I'm currently working for a company where I have to upgrade over 50 VB6 programs to VB.NET 2008.  So far I'm about half way through, and I've learned quite a few tricks that drastically improve the performance of VB.NET apps. Because there are a…
    Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.

    877 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now