.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

Wierd error during execution of SerializeReply of IDispatchMessageFormatter

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :WCF
I am trying to develop a WCF REST app as explained in http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/04640a45-1a37-4722-8ed7-9f75c155dc14 (which serves both XML and JSON at the same time). the error is in the return statement of the following code: Public Function SerializeReply(ByVal messageVersion As System.ServiceModel.Channels.MessageVersion, ByVal parameters() As Object, ByVal result As Object) As System.ServiceModel.Channels.Message Implements System.ServiceModel.Dispatcher.IDispatchMessageFormatter.SerializeReply Dim formatter As IDispatchMessageFormatter = Me.xmlFormatter If OperationContext.Current.OutgoingMessageProperties.ContainsKey(WebBodyFormatMessageProperty.Name) Then Dim webBody As WebBodyFormatMessageProperty = DirectCast(OperationContext.Current.OutgoingMessageProperties(WebBodyFormatMessageProperty.Name), WebBodyFormatMessageProperty) If webBody IsNot Nothing AndAlso webBody.Format = WebContentFormat.Json Then formatter = Me.jsonFormatter End If End If Return formatter.SerializeReply(messageVersion, parameters, result) End Function It gives the error as "The given key was not present in the dictionary." further going deeper the stack trace looks like the following: Encountered unexpected namespace 'http://schemas.microsoft.com/ws/2005/05/envelope/none'. The namespace must be empty. Parameter name: ns

View Complete Post

More Related Resource Links

Sporadic .NET application crash with "Fatal Execution Engine Error"

I have a .NET application that runs for several hours.  It is a multi-threaded app that does some calculations and saves the results to the database.   On one machine in particular, it has been crashing recently with the following exception recorded in the Event Log: .NET Runtime version 2.0.50727.4206 - Fatal Execution Engine Error (6C9D7B6E) (80131506) Faulting application AnalyzerConsole.exe, version, time stamp 0x4c76d28b, faulting module mscorwks.dll, version 2.0.50727.4206, time stamp 0x4bf4c6a7, exception code 0xc0000005, fault offset 0x0011627d, process id 0x%9, application start time 0x%10. Sometimes it runs for hours without crashing, but usually it will crash eventually. I have captured a dump, and this is the call stack: > ntdll.dll!_DbgBreakPoint@0()   mscorwks.dll!WatsonLastChance()  + 0x133 bytes   mscorwks.dll!EEPolicy::LogFatalError()  + 0x23c bytes   mscorwks.dll!EEPolicy::HandleFatalError()  + 0x47 bytes   mscorwks.dll!CLRVectoredExceptionHandlerPhase3()  + 0x10dae2 bytes   mscorwks.dll!CLRVectoredExceptionHandlerPhase2()  + 0x20 bytes   mscorwks.dll!CLRVectoredExceptionHandler()  + 0xb7 bytes   mscorwks.dll!CPFH_RealFirstPassHandler()  + 0x8ac bytes   mscorwks.dll!_COMPlusFrameHandler()  + 0xb9 bytes   ntdll.d

Getting Intermittent Execution permission cannot be acquired error

I hope I can explain the issue as I am more of a business/end user than a SharePoint expert. We are running a SharePoint intranet (MOSS 2007) within a Citrix environment. On intermittent occasions, we are receiving the error that I will post at the end of this message. This is happening intermittently and we simply can not reproduce the error.   100% of the time, we perform an IISReset on the SharePoint server and that resolves the problem. I actually have a scheduled task to run each morning to reset IIS, but the error still occurs on occasion. (again, once the error happens, if i reset IIS, it comes back up).   Has anyone ever run into this issue? Any comments or suggestions? Here is the error message:  Execution permission cannot be acquired. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Security.Policy.PolicyException: Execution permission cannot be acquired.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:   [PolicyException: Execution permission cannot be acquired.]    Syst

AppDomain unloading causes Fatal Execution Engine Error

After resolving my previous problem (by working around it, actually), I came to the point where I need to unload the AppDomain. After cleaning up all fibers that were created to be run in this AppDomain, my (C++/CLI) code runs AppDomain::Unload(_scriptDomain);, however, it terminates the process with a very, very bad error, according to the event logs: .NET Runtime version 2.0.50727.4927 - Fatal Execution Engine Error (7117851A) (80131506) The VS debugger crashes with a 'system error' in Debugger::HandleIPCEvent, which a web search shows as being no help. The (confusing) WinDbg stack trace is posted below: WARNING: HUGE STACK DUMPS FOLLOW (edit: removed due to falseness) [snip] I hope someone with more debugging experience than me can find out what's wrong with my program... I always get annoying issues when hacking on this! :(

SSIS Package returns the error - The command execution generated errors.

SSIS Package returns the error - 'The command execution generated errors'. Please let us know the cause for this error if anyone encountered this error before. Require a solution for this.   Thanks

SSIS Generic Error: The command execution has generated errors, more information?

How do I get more information from this error? I am just pulling from a csv file, looking up a couple values, and on match, updating a database with a stored procedure. I have made sure all datatypes match, and that there are no special characters in any of the records. I am importing over 3000 records, and only 4 fail, with this generic error, and I have scrutinized the data to the utmost. How do I get more information on this error? The lineageID is 0, what does that mean? In know it refers to a column, but 0 certainly doesnt relate to any columns. Thanks

.NET Runtime version 2.0.50727.3082 - Fatal Execution Engine Error (000006427F44A4EE) (80131506) aft


This is a new server, which has the latest security updates and Microsoft SQL Server 2008 Management Objects (for the application to connect to a remote SQL Server DB):

  • Windows Server 2003 R2 SP2
  • .NET Framework 2.0 (x64): (as a part of the SMO package install)

After install the Microsoft update KB951847, we are unable to start our application (It's a service application).

Error from the Event:

Event Type: Error
Event Source: .NET Runtime
Event Category: None
Event ID: 1023
Date:  9/11/2010
Time:  4:09:03 PM
User:  N/A
Computer: FLUFFY
.NET Runtime version 2.0.50727.3082 - Fatal Execution Engine Error
(000006427F44A4EE) (80131506)

From the Add/Remove program, the following were installed after the KB951847:

  • .NET Framework 2.0 SP2
  • .NET Framework 3.0 SP2
  • .NET Framework 3.5 SP1

I was unable to apply the patch KB913384 because, I think, the .NET 2.0 is at level SP2.   My only solution was to uninstall ALL of them (3.5 sp1, 3.0 sp2, and 2.0 sp2), then install back the base .N

.NET Runtime version 2.0.50727.3082 - Fatal Execution Engine Error (000006427F44A4EE) (80131506) aft


This is a new server, which has the latest security updates and Microsoft SQL Server 2008 Management Objects (for the application to connect to a remote SQL Server DB):

  • Windows Server 2003 R2 SP2 64-bit
  • .NET Framework 2.0 (x64): (as a part of the SMO package install)

After installing the Microsoft Update KB951847, we were unable to start our application (It's a service application).

Error from the Event:

Event Type: Error
Event Source: .NET Runtime
Event Category: None
Event ID: 1023
Date:  9/11/2010
Time:  4:09:03 PM
User:  N/A
Computer: FLUFFY
.NET Runtime version 2.0.50727.3082 - Fatal Execution Engine Error
(000006427F44A4EE) (80131506)

From the Add/Remove program, the following were installed after the KB951847:

  • .NET Framework 2.0 SP2
  • .NET Framework 3.0 SP2
  • .NET Framework 3.5 SP1

My only solution was to uninstall ALL of them (3.5 sp1, 3.0 sp2, and 2.0 sp2), then install back the base .NET Framework 2.0 (NetFx64.exe from the SMO install package).  Is the update KB951847 necce

SharePoint Error on Configuration - Server execution failed



I'm installing a fresh copy of SharePoint 2010 Standard on a fresh install of Win Server 2008 R2.  I have 8 GB of ram installed on the server.  I run the SharePoint 2010 Products Configuration Wizard and on Step 10 of 10 it fails with the following error:


09/28/2010 15:01:49  14  ERR                               

An exception of type System.ServiceProcess.TimeoutException was thrown.  Additional exception information: System error.
System.ServiceProcess.TimeoutException: System error.
   at Microsoft.SharePoint.PostSetupConfiguration.Common.RunCommand(String commandToRun, String args, Int32 maxMillisecondsWait, Int32& commandReturnCode)
   at Microsoft.SharePoint.PostSetupConfiguration.Common.TryToRestartIIS()
09/28/2010 15:01:49  14  WRN                                Failed to run iisreset with return code -1.  We will just eat this for now and see if we can start W3SVC

09/28/2010 15:03:04  14  ERR   



Hello all.. 


I have a simple DTSX package that takes a CSV file and loads it into a table in SQL Server 2008 Ent. x64 bit (on 2008 Ent. Server).  The package runs well when DTEXEC is executed locally on the server which it resides on.  I run into trouble when I try to execute the package using PSExec like so:

C:\>c:\pstools\psexec \\myservr -u "mydom\myuser" -p "mypass" dtexec /FILE "X:\ETL\packages\test1.dtsx" /CHECKPOINTING OFF  /REPORTING EW /DECRYPT mykey


The package encryption is set to "EncryptAllWithPassword", which I supply along with DTEXEC "/decrypt" attribute.  The error I am getting is "SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "MyDB" failed with error code 0x80004005. There may be error messages posted before this with more information on why the AcquireConnection method call failed."


When the package is executed locally, the user connection properties are exactly the same (Windows Authenticated connection, using an administrative account).  The account specified in the SSIS log below (mydom\myuser - modifi

Error converting data type nvarchar to numeric in Store Procedure execution



When I execute a Store Procedure via 'EXEC sp_XXX @p1, @p2' I'm getting this error 'Error converting data type nvarchar to numeric'.

After diggin into the TSQL code I have found that there's a field (type: nvarchar(200)) breaking the execution and resulting on the error.

If I query the table and the specified field with the same parameters as the Store Procedure the results are ok! If I execute the same code as the Store Procedure with the same parameters values the results are ok. The error only happens when executing the Store Procedure.

Any idea ?

Thanks in advance,

Gustavo Brian


If I cast the field to a smaller size value, as nvarchar(80), it works, but of course with data truncation.


Fatal Execution Engine Error (7A0F3CD5) (800703e9)


 Hi All,

 Below mentioned is the issues I'm facing when running my application.

1.  .Net Run time version 2.0.50727.3603 - Fatal Execution Engine Error (7A0F3CD5) (800703e9)
2.  Faulting application MyApplication.EXE, version , stamp 4b3b6f3f, faulting modules mscorwks.dll, version 2.0.50727.3603, stamp 4a7cd88e, debug ? 0, fault address 0x00283cd5.

These are two errors i got in Application Event Viewer.

My application works on the following:

 Need to write the Records(datas) in the file and update the status in 3 tables in SQL Server.

 Iteration will goes on for minimun 10 Lakhs records.


I got the above mentioned issues at nearly 70000 records and application get closed. But i cant able to catch the error in my application. I'm running my application in 2GB Ram. SQL server and application is in the same machine.


I couldn't exactly locate the issue...

Kinldy give me the valuable solutions and suggestions to resolve these issues....  Or any way to catch and handle these issues in my application itself...

Tnks in Advance........


The sandboxed code execution error



I have installed SharePoint standard edition on Windows Server 2008. Whenever I try to run a sandboxed solution using Visual Studio, sometimes I get the following message: 

"The sandboxed code execution request was refused because the Sandboxed Code Host Service was too busy to handle the request."

Sometimes it just works and sometimes it does not. I have searched on the internet for this error and the solution was to make sure that the sandbox service is running on central administration web site. Central Administration > System Settings > Maange Services on Server > Microsoft SharePoint Foundation Sandboxed Code Service. In my case this service is always running. So I don't understand why Am I keep getting above error message sometimes?

Thanks, Hitesh

Report Execution error when View page in VPN


I only have 1 user that cannot see reports. I even did a gotomeeting and we clicked refresh serveral times and we get the Report Execution Session died.


Every other user works on VPN. The rest of the wqeb site also works fine.


Does any have some pointers on find a resolution for this user. He is windows authenticated and using a VPN. ( I have 1 user out of at least 50 have worked fine with a report viewer over VPN.



Ideas appreciated. 

NET Runtime version 2.0.50727.3603 - Fatal Execution Engine Error Encountered for Remoting Applicati



We encountered a sudden "NET Runtime version 2.0.50727.3603 - Fatal Execution Engine Error" which caused our application to be terminated. We googled this error, and we found that there was a problem with mscorwks.dll (http://support.microsoft.com/kb/913384). This post is for Dec, 2007, but our servers have latest .NET Service Packs Installed. We feel that since .NET 2.0 SP2 is installed this error might have been fixed by Microsoft in SP2, not sure though. We are looking for any possible solutions, with which we can avoid this error again. I am mentioning the error and .NET software installed on our server below.

The application is installed as a Windows .NET Service and runs under Local System Account.

.NET Softwares Installed.

Microsoft .NET Framework 2.0 Service Pack 2
Microsoft .NET Framework 3.0 Service Pack 2
Microsoft .NET Framework 3.5 SP1
Microsoft Report Viewer Redistributable 2005

Below are the errors logged in the event viewer.

Event Type: Error
Event Source: Service Con

Error handling in DTS Package execution using .NET


Hi, I am executing a SQL Server 2000 DTS package using C# by following the code from this article http://support.microsoft.com/kb/319985. once the package is executed I am looping through each step to find out if any step has failed and get info about error if it has failed. I also use this information to find out if the package has succeeded or not (package failed if anyone step has failed). the issue I am facing here is that sometimes the package fails (jumps to catch block) with a generic error message that "Execution was canceled by user" and doesn't give any more information than that. If I run the package manually using the DTSRUNUI then I found that the package was expecting a text file as an input and the file didn't exist in the specified location. in that case the error message from .NET code should say that clearly. do I need to make any changes to the code from the article, to get more details about the errors. I added the following extra to get error information, but didn't help much. there are two properties called "FailonError" on package and "ExecuteInMainThread" on step objects. I tried setting them as well, but that also didn't help. not sure if they are required.

SQL Execution Error, Specified type is not registered on the target, when adding DateTime parameters


I have SQLServer 2008r2 installed on a Windows Server 2008 R2 machine.  I'm trying to build a report using SSRS - and as soon as I try to add some DateTime parameters to the query and execute, I get

SQL Execution Error.

Executed SQL Statement:  blah blah Error

Source: System.Data

Error Message: Specified type is not registered on the target server.System.DateTime, mscorlig, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089.

I tried taking the suggestion from another thread and installing the .NET Framework 2.0 from: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=B44A0000-ACF8-4FA1-AFFB-40E78D788B00, but I received the message that it is already installed.  How do I get past this error?

List Item Update Exception from HRESULT: 0x80040E2F Unexpected query execution failure, error code 3


A thread somewhat simliar to this has been posted before as well, but i just wanted to detail out the issue and circumstances

We have a list with 53 columns and 2600 items(and growing. I know its rubbish, but thats the way it is at the moment). The list was created using SharePoint GUI  on a test server, saved as a template with data, and was then imported to the production environment. I can post the list columns and type if it helps.

Every one in a while, on updating an item, SharePoint throws up the very not so helpful error page with "Exception from HRESULT: 0x80040E2F".

We looked into the logs and found that for each suc error, there was a Database level error logged as well.

The error starts with Unexpected query execution failure, error code 3621. Additional error information from SQL Server is included below. "The statement has been terminated." Query text (if available): "BEGIN TRAN;DECLARE... and runs for many lines so i wont post the entire blurb here.

Each time, the item update is successful, despite this error. The list also has an Item Updated event handler attached to it. Every time the update error occurs, the event handler does not seem to be firing.

Anybody can shed light on what is happening. We have tried exporting the list template to another site and everything seemed to work

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