Problems when running VB.NET app as a scheduled task


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.
kapowukAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ignacio Soler GarciaSolution Architech & Technical LeadCommented:
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
kapowukAuthor Commented:
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
kapowukAuthor Commented:
I think these DLLs were written in .NET if that helps!
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Ignacio Soler GarciaSolution Architech & Technical LeadCommented:
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
kapowukAuthor Commented:
Yep, well they're referenced in the Project if that's what you mean
0
Éric MoreauSenior .Net ConsultantCommented:
Are you trying to access a resource that may only be visible to a log user (a mapped drive for example) ?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kapowukAuthor Commented:
Nope everythings in in c:\foldername with Everyone readwritemodify attributes
0
Ignacio Soler GarciaSolution Architech & Technical LeadCommented:
No, I mean if you have added references to libraries from others ...
0
kapowukAuthor Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.