日期:2014-05-17  浏览次数:21143 次

出现错误: unable to save config to file
我的软件配置信息是存在. appconfig.exe中的.
也就是 软件的运行文件.exe.config 这样一个文件中.

但是我当我保存配置文件中的修改信息时,出现错误.如下:

system.configuration.configurationerro rsexception:unable to save config to file


详细如下:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Configuration.ConfigurationErrorsException: Unable to save config to file 'E:\Release\moeny.exe.Config'.
  at System.Configuration.Internal.WriteFileContext.ReplaceFile(String Source, String Target)
  at System.Configuration.Internal.WriteFileContext.Complete(String filename, Boolean success)
  at System.Configuration.Internal.InternalConfigHost.StaticWriteCompleted(String streamName, Boolean success, Object writeContext, Boolean assertPermissions)
  at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext, Boolean assertPermissions)
  at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext)
  at System.Configuration.Internal.DelegatingConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext)
  at System.Configuration.UpdateConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext)
  at System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll)
  at System.Configuration.Configuration.SaveAsImpl(String filename, ConfigurationSaveMode saveMode, Boolean forceSaveAll)
  at System.Configuration.Configuration.Save()
  at LanMengAccount.MainForm.chkAutoLogin_Click(Object sender, EventArgs e) in E:\source\Money\Code\meng\mneng\MainForm.cs:line 1548
  at System.Windows.Forms.Control.OnClick(EventArgs e)
  at System.Windows.Forms.CheckBox.OnClick(EventArgs e)
  at System.Windows.Forms.CheckBox.OnMouseUp(MouseEventArgs mevent)
  at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  at System.Windows.Forms.Control.WndProc(Message& m)
  at System.Windows.Forms.ButtonBase.WndProc(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
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
----------------------------------------
笨笨
  Assembly Version: 2.4.0.0
  Win32 Version: 2.4.0.0
  CodeBase: file:///E:/Release/笨笨.exe
----------------------------------------
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