I am working on a project with console app in Visual Studio 2012 (OS Windows 8). The program connects to SQL Server 2012 with a SqlConnection
class and write some data with SqlBulkCopy
.
Moreover, the program uses a StreamWriter
to print results. Furthermore, the program contains some Parallel.For
and Parallel.Invoke
. I got this error frequently in different part of my code. I used try catch block but the program throw this error.
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
I review related posts but I couldn't find any solution. I don't know it is related to my hardware. I add errors. Could you please help me to solve this problem?
Thank you.