473,414 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Exception: The operation was canceled.

Hi all,
i need help with one exception. I know only .Message of this exception and i know which part of code throws it.

Expand|Select|Wrap|Line Numbers
  1. .Message: "The operation was canceled."
Expand|Select|Wrap|Line Numbers
  1.             try
  2.             {
  3.                 FileIOPermission perm = new FileIOPermission(FileIOPermissionAccess.Write, file_name);
  4.                 perm.Assert();
  5.                 if (!additive && File.Exists(file_name)) File.Delete(file_name);
  6.                 using(FileStream fs = new FileStream(file_name, FileMode.OpenOrCreate, FileAccess.ReadWrite))
  7.                 {
  8.                     using(StreamWriter writer = new StreamWriter(fs))
  9.                     {
  10.                         writer.BaseStream.Seek(0, SeekOrigin.End);    
  11.                         writer.Write(content);    
  12.                         writer.Flush();    
  13.                         writer.Close();
  14.                         result = true;
  15.                     }
  16.                     fs.Close();
  17.                 }
  18.                 CodeAccessPermission.RevertAssert();
  19.             }
  20.             catch (System.Exception err)
  21.             {
  22.                 System.Diagnostics.Debug.WriteLine(err.Message);
  23.                 throw(err);
  24.             }
  25.  
FYI: This Windows application runs for many years, but once this error was occured and stored in log. Can somebody help me? Is anythere List of exception messages?

Thanks,
Michal
Jul 30 '08 #1
1 2712
arnaudk
424 256MB
This uses the .NET Framework classes, you might have more luck posting this question in the .NET forum.
Jul 30 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: chris.higginson | last post by:
Hi, I'm running SQL Server Version 8.00.194 on Windows 2000. I am am running this query: select TOP 2000 TheoVolImplied from OptionTrades where ReutersSymbol = 'IBM.N' and TheoVolImplied...
0
by: RWC | last post by:
Hi, I'm running into a problem with Access XP (SP2) that's driving me up the wall. It's Error 2001 "You canceled the previous operation". There is no voodoo going on really when I get this...
2
by: Ronny Sigo | last post by:
Hello all, I already put the same question, only now I have more to tell ... Although I used this code before in the same routine (only the fieldname of the table differs) ___ at this point in the...
0
by: Tamar | last post by:
Hello all, I am so frustrated. I am doing something so simple and yet I confront such a problem. I am writing a program in VB, opening a db connection to an access db using ADODC control. I...
1
by: John A. | last post by:
This is a database in use on Terminal server, been reliable, no corruption problems. (so far) Designing a form, asked to save objects, Access put up a dialog box for the current form asking me...
2
by: akameswaran | last post by:
Admittedly this problem causes no actual functional issues aside from an occasional error message when the program exits. The error is: Unhandled exception in thread started by Error in...
132
by: Zorro | last post by:
The simplicity of stack unraveling of C++ is not without defective consequences. The following article points to C++ examples showing the defects. An engineer aware of defects can avoid...
20
by: Crayola465 | last post by:
I have been trying to figure this out for a couple weeks and after reading every post in the forum about the subject I have not found anything that works. I have two tables; 1) has company...
2
by: strakamichal | last post by:
Hi all, i need help with one exception. I know only .Message of this exception and i know which part of code throws it. .Message: "The operation was canceled." try
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.