wodi666 Junior Member
Posts : 17 Join date : 2008-10-15
| Subject: Exception in v.2.201 Fri Mar 13, 2009 5:53 pm | |
| I have unpacked in a new folder c:\MCXY\ and start MC.exe, then a DirectoryNotFoundException was thrown. And if i try to close, same problem. - Quote :
- MC now stores all user configurable files in a "Media Companion" folder located in your users application data folder. This should solve issues with Vista permission issues when locating the program directory within "My Programs". When starting this version of the program all these files will be moves accordingly
There isn't a folder "Media Companion" in my "document and setting" (in a german winXP "Dokumente und Einstellungen"). Why do you ignore the exception handling? If you use a simple funktion like file open (http://msdn.microsoft.com/en-us/library/aa328779(VS.71).aspx), you can see what kind of exception can be thrown and you can handle it. - Code:
-
************** Ausnahmetext ************** System.IO.DirectoryNotFoundException: Ein Teil des Pfades "C:\Dokumente und Einstellungen\El\Anwendungsdaten\Media Companion\config.xml" konnte nicht gefunden werden. bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) bei System.IO.StreamWriter.CreateFile(String path, Boolean append) bei System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) bei System.IO.StreamWriter..ctor(String path, Boolean append) bei System.IO.File.CreateText(String path) bei Media_Companion.Form1.saveconfig() bei Media_Companion.Form1.Form1_Load(Object sender, EventArgs e) bei System.EventHandler.Invoke(Object sender, EventArgs e) bei System.Windows.Forms.Form.OnLoad(EventArgs e) bei System.Windows.Forms.Form.OnCreateControl() bei System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) bei System.Windows.Forms.Control.CreateControl() bei System.Windows.Forms.Control.WmShowWindow(Message& m) bei System.Windows.Forms.Control.WndProc(Message& m) bei System.Windows.Forms.ScrollableControl.WndProc(Message& m) bei System.Windows.Forms.ContainerControl.WndProc(Message& m) bei System.Windows.Forms.Form.WmShowWindow(Message& m) bei System.Windows.Forms.Form.WndProc(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Geladene Assemblys ************** mscorlib Assembly-Version: 2.0.0.0. Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000). CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll. ---------------------------------------- Media Companion 2.201 Assembly-Version: 2.2.0.1. Win32-Version: 2.2.0.1. CodeBase: file:///C:/Download/Media%20Companion%202.201/Media%20Companion%202.201.exe. ---------------------------------------- Microsoft.VisualBasic Assembly-Version: 8.0.0.0. Win32-Version: 8.0.50727.3053 (netfxsp.050727-3000). CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll. ---------------------------------------- System Assembly-Version: 2.0.0.0. Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000). CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll. ---------------------------------------- System.Windows.Forms Assembly-Version: 2.0.0.0. Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000). CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll. ---------------------------------------- System.Drawing Assembly-Version: 2.0.0.0. Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000). CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll. ---------------------------------------- System.Runtime.Remoting Assembly-Version: 2.0.0.0. Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000). CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll. ---------------------------------------- System.Data Assembly-Version: 2.0.0.0. Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000). CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll. ---------------------------------------- mscorlib.resources Assembly-Version: 2.0.0.0. Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000). CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll. ---------------------------------------- System.Windows.Forms.resources Assembly-Version: 2.0.0.0. Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000). CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll. ---------------------------------------- | |
|
billyad2000 Admin
Posts : 1326 Join date : 2008-09-20
| Subject: Re: Exception in v.2.201 Sat Mar 14, 2009 2:00 pm | |
| I've just fixed this, will upload later today. I just got the startup order mixed up on 2 subs Exception handling in this case is not really neccesary, if this folder does not exist then the program can't function. The folder gets checked for and if it doesn't exist then an attempt is made to create it. If it can't be created then the program informs the user and exits. The language is not relevent, MC uses the system path for users Application Data which is not language dependant - Code:
-
Dim applicationdatapath as string = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\Media Companion\" | |
|
wodi666 Junior Member
Posts : 17 Join date : 2008-10-15
| Subject: Re: Exception in v.2.201 Sat Mar 14, 2009 5:39 pm | |
| - Quote :
- I've just fixed this, will upload later today.
Cheers. - Quote :
- The language is not relevent, MC uses the system path for users Application Data which is not language dependant
Ok. I said, cause the german .net debuglogs look a bit diffrent to the english - Quote :
- Exception handling in this case is not really neccesary, if this folder does not exist then the program can't function. The folder gets checked for and if it doesn't exist then an attempt is made to create it. If it can't be created then the program informs the user and exits.
Ok, if you check the folder first. Greets WoDi666 | |
|
Sponsored content
| Subject: Re: Exception in v.2.201 | |
| |
|