.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Exception thrown from workflow

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :WPF


I got following exception in my workflow.

Type : System.Exception, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : #################(Exception Start)#####Transaction (Process ID 115) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.,
Workflow Manager,WFStart,0,
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.HasMoreRows()
   at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)
   at System.Workflow.Runtime.Hosting.PersistenceDBAccessor.RetrieveStateFromDB(DbCommand command, Boolean checkOwnership, Guid instanceId)
   at System.Workflow.Runtime.Hosting.PersistenceDBAccessor.RetrieveInstanceState(Guid instanceStateId, Guid ownerId, DateTim

View Complete Post

More Related Resource Links

Exception of type 'System.ExecutionEngineException' was thrown.

Hi,       I am showing a WPF Window as ShowDialog().  Before loading the window, we are showing a message box. Upon Pressing Cancel Button from the Message box, Application throws "Exception of type 'System.ExecutionEngineException' was thrown.".. While cancelling, Events are raised to close the Window.. If we comment that code, window will be in the open state, other wise will "Throw the error". Please help me!!!!!!!!!  

Exception has been thrown by the target of an invocation.

hi!! i am new to this,please help me with this when i use this,,,,image.Source = new BitmapImage(new Uri(str, UriKind.RelativeOrAbsolute));  it is working but when i use array of images and use  image[0].Source = new BitmapImage(new Uri(str, UriKind.RelativeOrAbsolute)); it gives me error  Exception has been thrown by the target of an invocation.   thanks

Application Exception Rule Violation thrown on Delete

I basically have my first simple asp.net MVC 2.0 web application up and running except for deletes. I tried to do the first delete today, but it throws an exception with the text Rules Violation.  I'm not sure what is causing the error however.It shouldn't be the database (I don't think) because when I trace the database, I never see the delete call and after having it fail, I was able to sucessfully run:DELETE FROM [Work] WHERE work_id = 84 GOCurrently this is my method (yes its primitive, but I was just trying to get it working), its the db.SubmitChanges() line where the application exception gets thrown. [HttpPost] public ActionResult Delete(int id, FormCollection collection) { try { // TODO: Add delete logic here var result = db.Works.SingleOrDefault(w => w.work_id == id); if (result == null) return View("NotFound"); db.Works.DeleteOnSubmit(result); db.SubmitChanges(); return RedirectToAction("Index"); } catch { var result = db.Works.SingleOrDefault(w => w.work_id == id); return View(result); } } }This may be a Linq-to-Sql issue as this is really the first time I've us

Exception of type 'System.OutOfMemoryException' was thrown.

Hi, i am just using select stmt from some view. view defination is also selecting columns from inner join of 3 tables. view count is about 46 millions records. so while selecting from view it gives me: Exception of type 'System.OutOfMemoryException' was thrown. same error occur if i use direct select from those tables instead of select * from view. What is the reason behind this. Any help will be appreciated. Thanks Punia

need help about Exception of type 'System.Web.HttpUnhandledException' was thrown.

Hi Friends

I am developing a website in which i am using services of a third party service providers. after some transactions on their pages they are transfering control to my page say page1.aspx. 

But when the control is transfered to my page there is an exception /Runtime error..

I am unable to trace this error. I had tried to log all the errors. Where I found this error.

3/19/2010 3:34:44 AM
Offending URL: http://www.mydomain.com/ThankYou.aspx Source: System.Web Message: Exception of type 'System.Web.HttpUnhandledException' was thrown. Stack trace: at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.thankyou_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5910a9b6\ab96f081\App_Web_upsitg7y.0.cs:line 0
at System.Web.HttpApplication.CallHandlerEx

Exception thrown when handling Window.Loaded event


Why is the exception assistant not "fired" in a debugging session when a Window.Loaded eventhandler calls code which throws an exception ?
        private void Window_Loaded(object sender, RoutedEventArgs e)
            //Application.Current.DispatcherUnhandledException +=
               new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(Current_DispatcherUnhandledException);
            int a = 1;
            int b = 0;
            int c = a / b;

        void Current_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)

Removing the comment signs (//) thus presenting an UnhandledException handler devinately makes the assistant "firing".
Is this behaviour by desi

Exception escapes from workflow despite TryCatch activity


I have a workflow inside a Windows Service that is a loop that performs work periodically. The work is done inside a TryCatch activity. The Try property is a TransactionScope activity that wraps some custom activities that read and update a database. When the transaction fails, I would expect any exception that caused this to be caught by the TryCatch. However, my workflow aborts. The workflow I have is the following:

var wf = new While(true)
  Body = new Sequence
    Activities =
      new TryCatch
        Try = new TransactionScope
          IsolationLevel = IsolationLevel.ReadCommitted,
          Body = new Sequence
            Activities = { ..custome database activities.. }
          AbortInstanceOnTransactionFailure = false
        Catches =
          new Catch<Exception>
            Action = new ActivityAction<Exception>
              Argument = exception,

TCP Client connecting to a dynamic ip - exception thrown


Im making a simple chat server for quite some time now and Im constantly having some easy problems I cant comprehend.

      client = new TcpClient();
      client.Connect(IPAddress.Parse(""), 15555);
It throws:
"A connection attempt failed because the connected party did not properly respond after a period of time, <br/>
or established connection failed because connected host has failed to respond"

Im connecting to myself over the internet I suppose but it wont work.

The thing is, Im not listening to this IP. Im listening to my LAN IP because Im connected to the internet through LAN so I cant listen to my global IP

because it throws an exception that the IP is not valid.

I suppose the real question is am I doing this right, and if not, what should i do?

sql server setup has encountered the following error exception has been thrown by the target of an i


OS - Windows Web Server 2008 R2

Processor: Intel (R) Xeon (R) CPU 5160 @ 3.00 GHZ 2.99 GHZ (2 Processor)

RAM 16.0 GB

System Type;: 64 bit Operating System

Trying to Install SQL Server 2008 R2 Standard

I installed all necessary SP and .Net Framework as instrcted but setup bring up the above error.

Please help - ASAP.


Content deployment job 'Remote import job for job with sourceID failed.The exception thrown was 'M


Anyone pls give me advice for Content Deployment at sharepoint 2007...

I am doing Content Deployment from one virtual machine to another virtual machine. Both virtual machines are at the different computers.

I got these errors..

Cannot create folder "Cache Profiles/_private". at Microsoft.SharePoint.Library.SPRequest.CreateFolderOnImport(String bstrUrl, String bstrFolderUrl, Guid guidFolderId, Int32 lDoclibRowId) at Microsoft.SharePoint.Deployment.FolderSerializer.CreateFolder(SerializationInfoHelper infoHelper, SPWeb parentWeb, ImportObjectManager objectManager) at Microsoft.SharePoint.Deployment.FolderSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject) at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject, DeploymentObject envelope) at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream) at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream) at Microsoft.SharePoint.Deployment.ImportObjectManager.ProcessObject(XmlReader xmlReader) at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects() at Microsoft.SharePoint.Deployment.SPImport.Run()


System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.


I get the following error anytime i change something in the XAML and try and build the project. If I change anything in the code behind it works everytime.... To get it to work i have to get out of the ide come back in place a space in one of the .vb files to change it then it will build..... Any ideas?


Error 107 The "ResourcesGenerator" task failed unexpectedly.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.IO.MemoryStream.set_Capacity(Int32 value)
   at System.IO.MemoryStream.EnsureCapacity(Int32 value)
   at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.BinaryWriter.Write(Byte[] buffer, Int32 index, Int32 count)
   at System.Resources.ResourceWriter.WriteValue(ResourceTypeCode typeCode, Object value, BinaryWriter writer, IFormatter objFormatter)
   at System.Resources.ResourceWriter.Generate()
   at System.Resources.ResourceWriter.Dispose(Boolean disposing)
   at Microsoft.Build.Tasks.Windows.ResourcesGenerator.Execute()
   at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult) 

WCF - Works from console app, but not from IIS app. No exception being thrown.


Hi all.

We've been doing WCF apps for a while. Mostly web apps calling business objects/functionality in Windows Service hosted WCF Apps.

We recently ran into an issue, and have been banging our heads on it for a while.

The code works in Casini (VS2008's webserver), and from a test console app we wrote. But when we put the code in an aspx page, it just hangs.

No exception is being thrown.
When we remote debug the app, attaching VS2008 to the w3p process, we get an error pop box:

"An unhandled exception of type 'System.Configuration.ConfigurationErrorsException' occurred in mscorlib.dll

Additional information: This element is not currently associated with any context"

But it's not being caught by the try catch block.

We're using netTcpBinding (have tried pipe, but no luck as well)

The Service hosts multiple Contracts through different endpoints:


Exception thrown on client proxy call to open

Exception thrown System.InvalidOperationException: The communication object cannot be modified while it is in the Opened state.

The following code throws this exception:

                if (dataAcesssProxy == null)
                    dataAcesssProxy = new CompetellaDataAccessService.CompetellaDataAccessClient();
                    dataAcesssProxy.ClientCredentials.Windows.ClientCredential = new System.Net.NetworkCredential("someuser", "password", "domain");

                    dataAcesssProxy.InnerChannel.Faulted += new EventHandler(InnerChannel_Faulted);

Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown in SharePoint 2


i was trying to access list webservices using visual studio 2010 in SharePoint2010.

i written a simple console app to call getlist method

class Program
    static void Main(string[] args)
        ListsProxy.Lists newlistProxy = new ListsProxy.Lists();
        newlistProxy.Credentials = new System.Net.NetworkCredential("administrator", "Password1");
        XmlNode nodelistitems = newlistProxy.GetListItems("Blist", null, null, null, null, null, null); ( ----> when i debug error it throws exception here?)
        XmlNamespaceManager nsManager = new XmlNamespaceManager(nodelistitems.OwnerDocument.NameTable);
        nsManager.AddNamespace("z", "#RowsetSchema");
        nsManager.AddNamespace("s", "uuid:BDC6E3F0-6DA3-11d1-A2A3-0AA00C14882");
        nsManager.AddNamespace("dt", "uuid:C2F41010-65B3-11d1-A29F-00AA00C14882");
        nsManager.AddNamespace("rs", "urn:schemas-microsoft-com:rowset");
        XmlNodeList nodes = nodelistitems.SelectNodes("rs:data/z:row", nsManager);

        foreach (XmlNode node in nodes)
          string str = node.Attributes["Customer Name"].Value;


Creating workflow in SP Designer 2010 results in Exception from HRESULT: 0x80131401


The workflow is a 1 step Approval workflow. I'd published it a few time and it worked just fine. I then made a change to an "Email task notification" step.

I get a dialog when I try to publish the workflow:

Workflow Error
Errors were found when compiling the workflow. The workflow files were saved but cannot be run.
(43, 3) Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401))

I tried the "Check for Errors" button and I get:
The workflow contains no errors.

Error dialog
Check for Error dialog

Anyone have any clues as to where I might start looking for clues? Nothing has been returned by the usual search engines...

I've just tried to create a brand new workflow and it's still giving me the above dialogs. :'(

Cannot start sharepoint workflow using "SPWorkflowManager.StartWorkflow" - unknown exception is thro



I have been working on a sharepoint project for a month now and it seems nothing just works right off the bat even if I go online and copy from someone's implementation.

I read about starting workflows programmatically from this site and I am currently using the following code to start my workflow.



    SPListItem item = workflowProperties.Item;

                    SPWorkflowManager objWorkflowManager = item.Web.Site.WorkflowManager;

                    SPWorkflowAssociationCollection associatedWorkflows = item.ParentList.WorkflowAssociations;

                    SPWorkflowAssociation workflow = associatedWorkflows.GetAssociationByName(

                        "ConfirmationFlow", System.Globalization.CultureInfo.CurrentCulture);


                    //Find the GUID for the workflow association 

                    string strSerializedParams = Utils.Serialize(r, new XmlSerializer(typeof(MyType)));


File is deleted but exception is thrown. How it is possible?


Hello everybody.

I am passing a file name via query string. When I am trying to delete the file it is throwing a FileNotFoundException. But the file practically deleted from the server. Both of the following codes of file delete :

File.Delete(Server.MapPath("~/Files/") + Request.QueryString["FileName"]);
File.Delete(Server.MapPath("~/Files/" + Request.QueryString["FileName"]));

are throwing that exception.

Can any one please tell me what is the reason behind this behavior or what I am doing wrong?

Thank you.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend