Bonjour, j’ai développé une application en C# sous Visual Studio 2013.
J’ai eu ensuite pour objectif d’automatiser son exécution grâce au planificateur de tâches, de manière à répéter l’action tous les jours à une heure définie.
Autre info, j’ai développé mon application sur un ordinateur Windows 7, depuis lequel
j’ai testé le planificateur de tâche. L’exécution a très bien fonctionné.
Toutefois, pour la mise en production, mon application est hébergée sur un serveur virtuel fonctionnant sous Windows Server 2008 R2.
Quand je lance l’application en cliquant dessus, jusque-là tout est ok.
Mais quand c’est le planificateur de tâche, ça ne fonctionne pas.
Par ailleurs, il m’affiche une exception 0xE0434352.
J’ai fait plusieurs recherches, mais je ne sais toujours pas ce que m’indique ce code, car aucune explication ne semble correspondre à mon problème.
Enfin, je suis allé consulter l’observateur d’évènements Windows, et voici ce qu’il m’a affiché pour l’exécution de mon application : (Cf ci-dessous )

Sauf que je n’ai absolument rien compris au message, et rien ne semble correspondre à mon problème.
Merci d’avance pour votre aide :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Description :
Application : WpfApplication2.exe
Version du Framework : v4.0.30319
Description : le processus a été arrêté en raison d'une exception non gérée.
Informations sur l'exception : System.IO.DirectoryNotFoundException
   à System.IO.__Error.WinIOError(Int32, System.String)
   à System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean, Boolean, Boolean)
   à System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, Int32, System.IO.FileOptions, System.String, Boolean, Boolean, Boolean)
   à System.IO.StreamReader..ctor(System.String, System.Text.Encoding, Boolean, Int32, Boolean)
   à System.IO.StreamReader..ctor(System.String, System.Text.Encoding)
   à System.IO.File.InternalReadAllLines(System.String, System.Text.Encoding)
   à System.IO.File.ReadAllLines(System.String, System.Text.Encoding)
   à WpfApplication2.MainWindow..ctor()

Informations sur l'exception : System.Windows.Markup.XamlParseException
   à System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
   à System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)
   à System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)
   à System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext)
   à System.Windows.Application.LoadComponent(System.Uri, Boolean)
   à System.Windows.Application.DoStartup()
   à System.Windows.Application.<.ctor>b__1_0(System.Object)
   à System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   à System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   à System.Windows.Threading.DispatcherOperation.InvokeImpl()
   à System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   à System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   à System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   à System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   à MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   à System.Windows.Threading.DispatcherOperation.Invoke()
   à System.Windows.Threading.Dispatcher.ProcessQueue()
   à System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   à MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   à MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   à System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   à System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   à System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   à MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   à MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   à System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   à System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   à System.Windows.Application.RunDispatcher(System.Object)
   à System.Windows.Application.RunInternal(System.Windows.Window)
   à System.Windows.Application.Run(System.Windows.Window)
   à System.Windows.Application.Run()
   à WpfApplication2.App.Main()