Error: Unable to evaluate expression because the code is optimized
You will get an error, but the code block below will trap it and you can get on with your life.
Try this:
using System.Threading.ThreadAbortException;
catch(ThreadAbortException ex)
{
throw;
}
The issue you describe seems to be by design as shown here:
http://support.microsoft.com/kb/312629/EN-US/
Using Server.Execute
should solve the problem