Hallo VBP Community ,
Ich hab ein Problem mit der Speicherung einer Datei in Anwendungsdaten.
Folgender Code löst die Exception aus:
Die Exception besagt ich hätte keinen Zugriff auf Anwendungsdaten.Das komische, ich kann davor ein Ordner erstellen und ich kann per einer speichern sub auch eine Datei dortrein Speicher,dort wird auch .Savefile() benutzt nur mit einem Savefiledialog davor etc. . Zugriff auf Anwendungsdaten habe ich ja sonst könnte ich wohl kaum einen Ordner erstellen und mit einer anderen Sub dateien reinschreiben.Admin bin ich auch ich habe keine Ahnung an was es Liegt.Hier noch die Exception:
Mfg Ryko
Ich hab ein Problem mit der Speicherung einer Datei in Anwendungsdaten.
Folgender Code löst die Exception aus:
Die Exception besagt ich hätte keinen Zugriff auf Anwendungsdaten.Das komische, ich kann davor ein Ordner erstellen und ich kann per einer speichern sub auch eine Datei dortrein Speicher,dort wird auch .Savefile() benutzt nur mit einem Savefiledialog davor etc. . Zugriff auf Anwendungsdaten habe ich ja sonst könnte ich wohl kaum einen Ordner erstellen und mit einer anderen Sub dateien reinschreiben.Admin bin ich auch ich habe keine Ahnung an was es Liegt.Hier noch die Exception:
System.UnauthorizedAccessException wurde nicht behandelt.
Message=Der Zugriff auf den Pfad "C:\Dokumente und Einstellungen\Besitzer\Anwendungsdaten\TB-Trainee Editor" wurde verweigert.
Source=mscorlib
StackTrace:
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, Boolean useLongPath)
bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
bei System.Windows.Forms.RichTextBox.SaveFile(String path, RichTextBoxStreamType fileType)
bei TB_Trainee_Editor.Tag_to_Tag.CreateFile() in C:\Dokumente und Einstellungen\Besitzer\Eigene Dateien\Visual Studio 2010\Projects\TB-Trainee Editor\TB-Trainee Editor\Tag to Tag.vb:Zeile 7.
bei TB_Trainee_Editor.Form1.ToolStripButton16_Click(Object sender, EventArgs e) in C:\Dokumente und Einstellungen\Besitzer\Eigene Dateien\Visual Studio 2010\Projects\TB-Trainee Editor\TB-Trainee Editor\Form1.vb:Zeile 260.
bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
bei System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bei System.Windows.Forms.ToolStrip.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
bei TB_Trainee_Editor.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:Zeile 81.
bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()
InnerException:
Mfg Ryko