I'm currently running two tasks which are copying data to my SQL Server. The data copying is done by the method
SqlBulkCopy.WriteToServer. I'm using the
SqlRowsCopiedEvent to show the user the amount of rows that are successfully copied. Every time this event is called I'm checking if the cancellation token is requested. If the token is requested (button click) I'm setting
true. This aborts the
Now I'm getting an
OperationAbortedException. I looked at the documentation and it says that this exception is thrown whenever the user is cancelling an operation. However I'm not 100% sure if it's right that this indeed throws when I abort the write to server method?
The documentation states that this exception is thrown in this case. This is normal behavior.