Winアプリ『タイリ... 投稿者:tommy 投稿日:2008/12/13(Sat) 15:03 No.50
 |
「単語を覚える」で答えを入力し、 次の単語を入力しようと、すると 以下のようなエラーメッセージが出てしまいます。
***********************
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text ************** System.UnauthorizedAccessException: Access to the path \'C:\\Program Files\\ThaiLingual\\log\\1\\1\\c11.txt\' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at 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) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.File.Create(String path) at LearningThai.ComFunc.writeWordToFile(String strDirPath, String strFilePath, ArrayList myAL, Int32 intPoint, String strWordCode) at LearningThai.frmLearn.writeCorrectWordToFile() at LearningThai.frmLearn.Form1_KeyPress(Object sender, KeyPressEventArgs e) at System.Windows.Forms.Control.OnKeyPress(KeyPressEventArgs e) at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m) at System.Windows.Forms.Form.ProcessKeyPreview(Message& m) at System.Windows.Forms.Control.ProcessKeyMessage(Message& m) at System.Windows.Forms.Control.WmKeyChar(Message& m) 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.1433 (REDBITS.050727-1400) CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll ---------------------------------------- LearningThai Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Program%20Files/ThaiLingual/LearningThai.exe ---------------------------------------- Microsoft.VisualBasic Assembly Version: 8.0.0.0 Win32 Version: 8.0.50727.1433 (REDBITS.050727-1400) 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.1433 (REDBITS.050727-1400) 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.1433 (REDBITS.050727-1400) 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.1433 (REDBITS.050727-1400) 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.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll ----------------------------------------
************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.
For example:
<configuration> <system.windows.forms jitDebugging=\"true\" /> </configuration>
When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box. |
Re: Winアプリ『タ... - タイリン 2008/12/13(Sat) 15:17 No.51  |
うーん、エラー処理は全然入れてません(^^: なので、どんな状況のエラーなのかわかりませんが、SEの勘だけで、予想すると「ファイルへのアクセスが拒否された」と言っているようなので、ログファイルがなぜか読み取り専用になっているのかもしれません。
まず、このエラーが出た状況なのですが、今まで普通に使えていたのでしょうか? それともいきなりこのエラーが出て使えなかったのでしょうか?
今まで普通に使えてたとしたら、指定されたファイル (C:\\Program Files\\ThaiLingual\\log\\1\\1\\c11.txt) を右クリックで「プロパティ」を見てください。 読み取り専用になっていれば、そのチェックを外してやってください。
でも、なんで、「\\」が2つあるんでしょう。 それがちょっと不思議です。 エラーが全部英語で表示されていますが、もしかして英語OSをお使いでしょうか?
また、使い始めていきなりこのエラーが出るということは、なにかtommyさんがお使いのPCの環境が影響していると思われます。 (C:\\Program Files\\ThaiLingual\\log\\1\\1\\c11.txt) ここのファイルに書き込みができないのかもしれません。 会社のPCでしょうか? Admin権限はありますか? 「\\」が2つあるので、ファイルが見つからない?可能性もあります。どんなOSをお使いなのか教えていただけると幸いです。 |
|