SPUtility.TransferToErrorPage throwing System.Threading.ThreadAbortException

I am trying to call SPUtility.TransferToErrorPage from with in a ASPX code behind method in a sharepoint farm solution. it throws me the below error:
System.Threading.ThreadAbortException: Thread was being aborted.
   at System.Threading.Thread.AbortInternal()
   at System.Threading.Thread.Abort(Object stateInfo)
   at System.Web.HttpResponse.End()
   at System.Web.HttpServerUtility.Transfer(String path)
   at Microsoft.SharePoint.Utilities.SPUtility.TransferToErrorPage(String message, String linkText, String linkUrl)
Can anyone help me in resolving this issue ?
Thanks
Vamsee
Vamsee Inala

You need to catch ThreadAbortException which might occur when some code is already running.
This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

Similar Messages

  • Workflow is Canceled instantly - System.Threading.ThreadAbortException: Thread was being aborted.

    Hi,
    I am trying to solve some issues and strange behaviour with an important workflow hooked up with an InfoPath 2010 list in SharePoint 2010. Everything worked fine until now.
    One workflow item has ended prematurely with the workflow history messages "An error has occurred in workflowname" followed by some init text message I added, and finally "Could not start workflowname"
    (not sure of the exact translation but something like that). Status is still "On Going" (again not sure of translation).
    The workflows after this has gotten the status "Canceled" with no further error messages. However the first init text I added is visible in their workflow history but no other messages are displayed, neither my custom ones nor
    the built in.
    Please help me out, any hints or pointers to help debug this is very appreciated! I do not have other than "view" access so I will have to tell the IT-department to check logs and perform changes if needed.
    /Jesper Wilfing
    Edit: The IT guys sent me the error message from the log file:
    Workflow Infrastructure       72fq
     Unexpected Start Workflow: System.Threading.ThreadAbortException: Thread was being aborted.

    Hi,
    Thank you for sharing and it will help others who meet the same issue.
    Best regards,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Access denied error while writing a file to the file system - myfileupload.saveas() throws system.unauthorizedexception

    hi,
    as part of my requirement , i have to perform read and  write  operations of  few files [ using the file upload control in my custom visual web part] and on submit button click.
    but while writing these files - with the help of  fileupload control - and when i use  myfileupload.saveas(mylocation);
    - i am saving these files into my D:\ drive of my server , where i am executing my code -, am getting access denied error.
    it throws system.unauthorizedexception.
    i have given full control on that folder where i was trying to store my attached files. and also  after following asp.net forums,
    i have added  iusr group added and performed all those steps such that, the file is saved in my D:\ drive.
    but unfortunately  that didnt happen.
    also
    a) i am trying the code with runwithelevatedprivileges(delegate() )  code
    b) shared the drive within the  d :drive where i want o save the files.
    c) given the full privieleges for the app pool identity- in my case , its
    network service.
    the  other strange thing is that, the same code works perfectly in  other machine, where the same sp, vs 2012  etc were installed .
    would like to know, any other changes/ steps i need to make it on this  server, where i am getting the  error.
    help is  appreciated!

    vishnuS1984 wrote:
    Hi Friends,
    I have gone through scores of examples and i am failing to understand the right thing to be done to copy a file from one directory to another. Here is my class...So let's see... C:\GetMe1 is a directory on your machine, right? And this is what you are doing with that directory:
    public static void copyFiles(File src, File dest) throws IOException
    // dest is a 'File' object but represents the C:\GetMe1 directory, right?
    fout = new FileOutputStream (dest);If it's a directory, where in your code are you appending the source file name to the path, before trying to open an output stream on it? You're not.
    BTW, this is awful:
    catch (IOException e)
    IOException wrapper = new IOException("copyFiles: Unable to copy file: " +
    src.getAbsolutePath() + "to" + dest.getAbsolutePath()+".");
    wrapper.initCause(e);
    wrapper.setStackTrace(e.getStackTrace());
    throw wrapper;
    }1) You're hiding the original IOException and replacing it with your own? For what good purpose?
    2) Even if you had a good reason to do that, this would be simpler and better:
    throw new IOException("your custom message goes here", e);
    rather than explicitly invokign initCause and setStackTrace. Yuck!

  • HT201457 I have a mid 2011 iMac and have installed windows 8.1 on it  I costantly get system thread not handled and kernel security check failure and the Mac restarts

    I Have a mid 2011 iMac with windows 8.1 on it and constantly get system thread exception not handled and kernel security check failur

    I Have a mid 2011 iMac with windows 8.1 on it and constantly get system thread exception not handled and kernel security check failur

  • Macbook pro running windows 8.1 system thread exception not handled

    Running Windows 8.1on MacBook Pro with dual operating system. Get BSOD on boot up with following message - system thread exception not handled but no error code.  Have checked drivers all seem to be updated. Ran fine for a few weeks but Is happening daily also external speakers are not working - please help.

    Was W8.1 installed using Bootcamp? Are BC drivers installed? What year/model is the MBP?

  • Adobe form generation fm throwing system error

    Hi All,
    If the item data we are sending is greater than 19 records then the Fm is throwing system error.
    If we send less than 19 it is generating the adobe form.
    I checked all the Zcode there is no restriction in Zcode.
    Can you please provide your ideas in overcoming this.
    Thanks in advance.
    Regards,
    Vishnu

    Hi Santhosh,
    You can try the following..
    In the backend use Tcode SE91.. fill in QISR as the Message Class & 402 as the Message Number and click on the 'Where-Used List' icon in the menu.. If the message is not triggered dynamically, it will take you to the program where it is triggered.. may be that will help you locate the error..
    Regards,
    Suresh Datti

  • Fail to upgrade my laptop to Windows 10 due to :"system thread exception not handled ndis.sys"

    Hi,I am trying to upgrade my Toshiba satellite Z30 laptop from windows 8.1 to windows 10.every time i try( and i tired more than 8 times already), it goes all the way to finishing installing the drivers and then after the auto reboot it comes up with a :"system thread exception not handled ndis.sys" error. at the second boot phase.I have an Intel I218V network adapter and an Intel(R) Dual Band Wireless-AC 3160.I tries upgrading them manually to a windows 10 compatible driver before the install but still no success.I also tried a clean booot and disabling both adapters before upgrading.does anyone have an additional idea of how to solve this problem? thanks Amose

    My many Win 10 install attempts have failed similarly. In the final phase of install during "Configuring Settings" I get the error message: "System Thread Exception Not handled...."  I'm not sure if it reads, "ndis.sys" at the end. The message doesn't remain long.I have a Satellite L355-S7905 with Windows 7 Home Premium. 

  • Enabled Hyper-V causes "System thread exception not handled" BSOD in builds 10041 and 10049

    I had a Windows 10 TP build 9926 installation with Visual Studio 2013 Community Edition installed, when build 10041 was released Windows Update tried to install it but after restart it got BSOD with "System thread exception not handled" text and
    reverted back to 9926 with error code 0xC1900101-0x40017. I tried update from ISO, got the same BSOD. Tried clean installation, it worked. 
    I decided to install software and restart the system after each installation and discovered that installing Visual Studio 2015 CTP6 caused BSOD after restart if and only if emulators were included. Installation of  Visual Studio 2015 CTP6 without emulators
    and then installation of Tools for Windows 10 also caused BSOD with "System thread exception not handled" error after restart. 
    So I thought that it was Hyper-V related and disabled hardware virtualisation in BIOS settings. It worked, system successfully booted, but, of course, Tools for Windows 10 setup showed up and told me about fail in UAP for Windows Phone package.
    So, my hardware is Gigabyte GA-A75N-USB3 motherboard with AMD A8-3870 APU with integrated graphics, Intel SSDSA2CW080G3 80GB SSD and 8 GB RAM.
    Steps to reproduce are to enable "Virtualisation" item in BIOS settings, install Windows 10 Technology Preview Build 10041, install Visual Studio 2015 CTP6, install Visual Studio Tools for Windows 10 Preview, restart the system and
    see blue screen with white text of description of "System thread exception not handled" error.

    Same issue, MSI A75MA-G55 AMD Fusion Socket FM1 with A8-3850 APU, 16GB RAM.  Hyper-V worked in 9926, but broke in 10041 and remains broken in 10049.  I have found that if you get in this BSOD loop, you can boot to Safe Mode and Un-install Hyper-V
    to recover.  10041 was an update to 9926, and 10049 was a clean install.

  • System.Threading.Tasks parameter passing?

    How do we pass parameter into a function called by a task? Please take a look at below code which has a problem where all 3 task will only use the latest parameter value but if i were to use different variable names then it will be correct!?
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Threading.Tasks;
    using System.IO;
    namespace TestTask
    public partial class Form1 : Form
    public Form1()
    InitializeComponent();
    private static void DoCalc(string AStr)
    string path = @"C:\" + AStr;
    StreamWriter sw = new StreamWriter(path);
    sw.Write(AStr);
    private void Form1_Load(object sender, EventArgs e)
    string LStr = "1";
    Task LTask = new Task(() => DoCalc(LStr));
    LTask.Start();
    // this work
    //string LStr2 = "2";
    //LTask = new Task(() => DoCalc(LStr2));
    // this does not work
    LStr = "2";
    LTask = new Task(() => DoCalc(LStr));
    LTask.Start();
    // this work
    //string LStr3 = "3";
    //LTask = new Task(() => DoCalc(LStr3));
    // this does not work
    LStr = "3";
    LTask = new Task(() => DoCalc(LStr));
    LTask.Start();

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using System.Data.Sql;
    using System.Data.SqlClient;
    using System.Data;
    namespace Hilos
        public class Cadence
            public string Nombre
                get;
                set;
            public ConsoleColor Color
                get;
                set;
            public int Numero
                get;
                set;
            public string fieldId
                get;
                set;
            public Cadence(string nombre, int num, string fiel,ConsoleColor color )
                this.Nombre = nombre;
                this.Numero = num;
                this.fieldId = fiel;
                this.Color = color;
                public Cadence()
        public class SimpleThread
            public void StartObject(object info)
                // This receives the value passed into the Thread.Start method.
                Cadence value = (Cadence)info;
                SqlConnection conn = new SqlConnection("#your config file#");
                conn.Open();
                string query = "select top 2 * from "+ value.Nombre;
                SqlCommand cmd = new SqlCommand(query, conn);
                DataSet datos=new DataSet ();
                using (SqlDataAdapter adapter = new SqlDataAdapter(cmd))
                    adapter.Fill(datos); 
                foreach (DataRow itemRow in datos.Tables[0].Rows)
                    for (int cell = 0; cell < datos.Tables[0].Columns.Count; cell++)
                        Console.ForegroundColor = value.Color;
                        Console.SetCursorPosition(0, int.Parse(value.fieldId));
                        Console.WriteLine("Hilo numero {0} :", value.Numero);                                    
                        Console.Write("                                                
                        Console.SetCursorPosition(0, int.Parse(value.fieldId) + 1);
                        Console.WriteLine(itemRow[cell] + "|");
                        Thread.Sleep(ConfigClass.segundos);
                Console.SetCursorPosition(0, int.Parse(value.fieldId) + 1);
                Console.Write("                                                        
                Console.SetCursorPosition(0, int.Parse(value.fieldId) + 1);
                Console.ForegroundColor = ConsoleColor.White;
                Console.Write("Done  \n");            
            public void  MainProcess()
                // Create an array of Thread references.
                Thread[] array = new Thread[4];
                //for (int i = 0; i < array.Length; i++)
                    // Start the thread with a ParameterizedThreadStart.
                    ParameterizedThreadStart start = new ParameterizedThreadStart(StartObject);
                    array[0] = new Thread(start);
                    array[0].Name = "uno";
                    array[0].Start(new Cadence("tablename", 1, "5",ConsoleColor.Yellow));
                    array[1] = new Thread(start);
                    array[1].Name = "Dos";
                    array[1].Start(new Cadence("tablename", 2, "8", ConsoleColor.Blue));
                    array[2] = new Thread(start);
                    array[2].Name = "Tres";
                    array[2].Start(new Cadence("tablename", 3, "11", ConsoleColor.Red));
                    array[3] = new Thread(start);
                    array[3].Name = "Cuatro";
                    array[3].Start(new Cadence("tablename", 4, "14", ConsoleColor.DarkGreen));
                // Join all the threads.
                    //for (int i = 0; i < array.Length; i++)
                    //    array[i].Join();
                    int index = 0;
                    bool stoped = true;
                    string thread="";
                    List<Thread> listaHilo = new List<Thread>();
                    while (stoped)
                        foreach (Thread item in array)
                            if (item.ThreadState == ThreadState.Stopped && !listaHilo.Contains(item) )
                                //stoped = false;
                                thread = item.Name;
                                Console.SetCursorPosition(0, 2);
                                Console.Write("                                        
                                Console.SetCursorPosition(0, 2);
                                Console.Write("DONE , hilo numero: {0}", thread);                         
                                listaHilo.Add(item); 
                            if (array.ToList().Count == listaHilo.Count)
                                stoped = false; 
                        Console.SetCursorPosition(0, 1);
                        Console.ForegroundColor = ConsoleColor.White;
                        Console.Write("Segundos : {0}", (index += 1));
                        Thread.Sleep(ConfigClass.segundos);
                Console.ReadLine();
            }//end funtion
        }//end class
        public static class ConfigClass
            public static int segundos= 250;        
    }

  • Control.invoke() throws System.ArgumentException with Error message as 'Parameter is not valid'

    Hi All,
    While doing cross thread communication, i am getting System.ArgumentException with Error message as 'Parameter is not valid' when call is made on the control.invoke(delegate method, parama object[]).
    I have checked the parameters, all parameters look good.
    Please share your views on this.

    I am going to explain the following Exception schenario.
    The RenderForm() is called from different thread and initially panel.InvokeRequired is true as it gets called from different thread and then invoke() gets called.
    So again same method is getting called and InvokeRequired property has then changedd to false and then else part of the code is executed however if i call the RenderForm() repetadely then application throws the exception as stem.ArgumentException with Error
    message as 'Parameter is not valid'
    And the Exception stack trace is as below-
      Type: System.ArgumentException
      Message: Parameter is not valid.
      Source: System.Windows.Forms
      TargetSite: System.Object MarshaledInvoke(System.Windows.Forms.Control, System.Delegate, System.Object[], Boolean)
      StackTrace: at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
      StackTrace: at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
      StackTrace: at NCR.APTRA.RendererCore.RendererCore.RenderForm(TTUForm form, IDataRecord data, Boolean clear)
    Adding the code snippet:
    private void RenderForm(TTUForm form, IDatRec.IDataRecord data, bool clear)
                if (panel.InvokeRequired)
                        panel.Invoke(new RenderFormInvoke(RenderForm), new object[] { form, data, clear });
       else
    //logic to draw the window content
    Please help me on this.. Thanks..

  • SPLongOperation throws error "Thread was being aborted"

    Recently we have migrated our SharePoint application from 2010 to 2013, we have upgraded our solution from VS 2012 to VS 2013 and deployed it successfully in newly installed SharePoint 2013 prior to content DB migrate and all.
    In our solution, we had requirement to implement lengthy operation which create site from site template, copying documents from one library to another, creating user groups and so on. To achieve these, we have used
    SPLongOperation which is taking care for not to abort thread and complete operation without and time constraint, which is working fine 2010 environment. 
    After upgrading to 2013, we started facing problem with "Thread was being aborted", which seems SPLongOperation is not working.
    Have I missed any configuration?
    Help appreciated.
    Arpan Shah MSFT Mark as Answer if it solves your problem. Vote As Helpful if the post is helpful for you.

    Hi,
     According to your description, I suggest you debug your code in the test
    environment and check if the method of SPLongOperation.End throw the exception.
    The code snippet below for your reference:
    //Long Operation Code
    using (SPLongOperation longOperation = new SPLongOperation(this.Page))
    //Start the long operation
    longOperation.Begin();
    //Your Long Operation Code Goes Here...
    //End the long operation
    longOperation.End("http://localhost/_layouts/success.aspx", Microsoft.SharePoint.Utilities.SPRedirectFlags.DoNotEndResponse, HttpContext.Current, "");
    More information:
    http://snahta.blogspot.com/2009/10/splongoperation-class.html
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Using Azure 2.5 cspack throws System.Runtime.Serialization.SerializationException: Type 'System.Xml.Linq.XElement' in Assembly 'System.Xml.Linq Not marked as serializable

    Hi,
    I am using Azure SDK 2.5 package, and when I run cspack from build window it throws me below error:
     error MSB4018: The "CSPack" task failed unexpectedly.
    System.Runtime.Serialization.SerializationException: Type 'System.Xml.Linq.XElement' in Assembly 'System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.
    But when I use the 2.4 SDK it works fine for me. Please advice how to fix this issue.
    Thanks,
    Ravi

    Hi,
     I am not sure about the root cause, but I did find a workaround for this at the following stackoverflow article
     http://stackoverflow.com/questions/26910773/azure-2-5-sdk-upgrade-causes-cspack-fail
     "Copy the Azure SDK 2.4 version cspack.exe, ServiceDescription.dll & Microsoft.ServiceHosting.Tools.MsBuildTasks.dll to Azure SDK 2.5 cspack.exe location and replace. This would using cspack 2.4 to pack with Azure SDK 2.5 runtimes."
     Let us know if this helps.
    Regards,
    Nithin Rathnakar

  • Satellite L750 PSK2YV: system thread exception not handled (athwbx.sys)

    I upgraded my Toshiba L750-A-210 laptop (short number: PSK2YV) to windows 8.1 pro from win 7.
    but now windows crashes on every restart and i cannot log in to the system, also i cant recover because i deleted the recovery partition in order to install the windows 8 but i have it on another hard disk.
    *do you have any ideas about resolving this issue.*
    I read some threads on the web and apparently it's a compatibility problem with the Qualcomm wireless adapter also toshiba site says my laptop model is not supported for 8 upgrade.
    I just want to get my laptop back to win 7
    P.S windows shows this error: system_thread_exception_not_handled (athwbx.sys)
    my laptop specs:
    http://www.toshibamea.com/TechnicalSupportDetails.aspx?pageid=21&productid=5 0203
    Best Regards,

    Hi
    The athwbx.sys belongs to the Atheros driver It looks that the installed Atheros Wlan driver isnt fully compatible by the Windows 8.1 system.
    You could try to remove / uninstall the driver in order to solve this issue.
    If you did not create the recover disk in the past then you will not be able to recovery the notebook back to factory settings to Win 7
    I guess you will need to order the recovery medium from Toshiba in case you want to use the Win 7 again.
    By the way: your notebook model has been released in USA So you should check the Toshiba USA forum and support page for driver update.
    By the way; here is an forum thread about the similar issue:
    http://forums.toshiba.com/t5/Windows-8-8-1/Blue-screen-error-athwbx-sys/td-p/612409

  • How to Count all System Threads using java

    When we open task manager, under performance tab we get totals frame. In that frame we can see Handles,threads and processes values. I wants to fetch the value of only thread value using java program.
    what should I do if I want to fetch the all threads running under the system?
    Now I am using java.lang.management.*;
    ThreadMXBean abcd = ManagementFactory.getThreadMXBean();
    System.out.println("abcd : " + abcd.getThreadCount());
    But it is giving me only....current thread values......I want to fetch all threads running on the system.

    jschell wrote:
    As a thought the sysinternals tools might provide a command line version that does something like that for windows.pslist.exe from sysinternals does it.
    As well as other free programs you can google for (pv.exe, process.exe).
    Tried them all in XP and they work. You may want to see what about Vista, 2K.

  • AvailableDisk.AddToCluster() throwing System.Management.ManagementException with message generic failure

    I am trying to add available disk to cluster using c# wmi calls. I have generated the class with visual studio.
    Disk is added to cluster successfully . But in the end it is throwing exception.
    System.Management.ManagementException was unhandled by user code
      HResult=-2146233087
      Message=Generic failure  
      Source=System.Management
      StackTrace:
           at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
           at System.Management.ManagementObject.InvokeMethod(String methodName, ManagementBaseObject inParameters, InvokeMethodOptions options)
           at CloudStack.Plugin.WmiWrappers.ROOT.MSCLUSTER.AvailableDisk.AddToCluster(String ResourceName, String& Path) ROOT.MSCluster.MSCluster_AvailableDisk.cs:line 919
                

    Hi,
    The issue is related to C# language, I suggest you ask for help from MSDN forum for better and accurate answer to the question.
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral
    Regards,
    Mandy
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

Maybe you are looking for

  • How do I add to the list of servers in 'Date & Time' System Preferences?

    Earlier versions of the Mac OS (9 and below, I believe) allowed a user to add to the list of time servers in what was then the Date and Time Control Panel. Now, under OS X (Tiger), I am able to select from the three servers that Apple provides, but I

  • Can we put text and button together in the same cell of ALV?

    Can we put a button and text in a cell of ALV Grid? Requirement in detail: Material Description + button - when the button is clicked, it opens up a screen to enter text. I able to open the screen ob button click but.. when  I concatenated the materi

  • Determining system load

    Is it possible for the Java RTS to return information about the load the threads it manages are putting on the CPU? I have developed a number of alternative schedulers using the priority scheduler as my base (using some of the ideas brought up on thi

  • Possible new version of Flashback trojan

    Dear all, today I experienced some problems just like the people in these two threads: https://discussions.apple.com/thread/3355170?tstart=0 https://discussions.apple.com/message/16280207#16280207 Among others, my finder sidebar suddenly said SD5, SD

  • Adobe AIR native extension for Chromecast?

    Is it available or is the Adobe AIR team working on a simple way to cast to Chromecast from AIR/Android SDK ? Chhers