Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 634211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:16:10+00:00 2026-05-13T20:16:10+00:00

It took some time to solve this and the conclusions are interesting. Our Office

  • 0

It took some time to solve this and the conclusions are interesting.

Our Office (Word/Excel/PowerPoint) add-in sends a request to our custom WCF service, the hosting Office application terminates, leaving this entry in the application log:

Provider: .NET Runtime 
EventID: 1023
Level: 2
Task: 0 
Keywords: 0x80000000000000 
Channel: Application 
EventData: .NET Runtime version 2.0.50727.4200 - Fatal Execution Engine Error (6BC47B3E) (80131506)

To reproduce this, create a new “Word 2007 Add-in” project in Visual Studio 2008. Add references to System.ServiceModel and System.Runtime.Serialization. Modify your ThisAddin class to contain this code, which I believe is the minimum code necessary to reproduce this behaviour:

[Serializable]
public class CustomQuery { }
[Serializable]
public class CustomQueryCollection : ReadOnlyCollection<CustomQuery>
{
    public CustomQueryCollection(IEnumerable<CustomQuery> queries)
        : base(queries.ToArray())
    { }
}
[Serializable]
[KnownType(typeof(CustomQueryCollection))]
public class CustomRequest : ISerializable
{
    readonly CustomQueryCollection _collection;
    public CustomRequest(IEnumerable<CustomQuery> queries)
    {
        _collection = new CustomQueryCollection(queries);
    }
    protected CustomRequest(SerializationInfo info, StreamingContext context)
    {
        _collection = (CustomQueryCollection)info.GetValue("Queries", typeof(CustomQueryCollection));
    }
    public CustomQueryCollection Queries { get { return _collection; } }
    void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
    {
        info.AddValue("Queries", _collection);
    }
}
[ServiceContract]
public interface ICustomService
{
    [OperationContract]
    void SendRequest(CustomRequest request);
}
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
public class CustomService : ICustomService
{
    public void SendRequest(CustomRequest request)
    {
        // this line is never reached.
    }
}
public class CustomClient : ClientBase<ICustomService>, ICustomService
{
    public CustomClient(Binding binding, EndpointAddress address)
        : base(binding, address)
    { }
    public void SendRequest(CustomRequest request)
    {
        Channel.SendRequest(request);
    }
}
public partial class ThisAddIn
{
    private void ThisAddIn_Startup(object sender, System.EventArgs e)
    {
        var address = "net.pipe://localhost/kamikaze";
        var endpointAddress = new EndpointAddress(address);
        var binding = new NetNamedPipeBinding();
        using (var serviceHost = new ServiceHost(new CustomService()))
        using (var client = new CustomClient(binding, endpointAddress))
        {
            serviceHost.AddServiceEndpoint(typeof(ICustomService), binding, address);
            serviceHost.Open();
            client.SendRequest(new CustomRequest(new CustomQuery[0]));
            // this line is never reached.
            serivceHost.Close();
        }
    }
    private void ThisAddIn_Shutdown(object sender, System.EventArgs e) { }
    #region VSTO generated code
    private void InternalStartup()
    {
        this.Startup += new System.EventHandler(ThisAddIn_Startup);
        this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
    }
    #endregion
}

Hit [F5]: Word 2007 starts, and then disappears, leaving the log message described above in your system’s application log. The same code works perfectly fine in all other contexts that we’ve tried.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:16:10+00:00Added an answer on May 13, 2026 at 8:16 pm

    Change these lines of code:

    [KnownType(typeof(CustomQueryCollection))]
    [KnownType(typeof(CustomQuery[]))]
    
    _collection = (CustomQueryCollection)info.GetValue("Queries", typeof(CustomQueryCollection));
    _collection = new CustomQueryCollection((CustomQuery[]) info.GetValue("Queries", typeof(CustomQuery[])));
    
    info.AddValue("Queries", _collection);
    info.AddValue("Queries", _collection.ToArray());
    

    …there. No more fatal engine execution errors. I suspect this is related to Office being a .Net 2.0 host, while all our other use cases and tests involved .Net 3.5 hosts, but I’m only guessing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OK, this is probably pretty basic stuff, but it took me quite some time
So I took some time this afternoon to finally sit down and begin reading
it took me some time to find out that both Eclipse and Aptana get
So, I took some code from this Microsoft provided Example which allows me to
So a couple years back I took some time to grok make , and
It took me quite some time to understand the difference between an rvalue and
I have been looking for quite some time for an answer to this, and
Some time ago we took over the responsibility of a legacy code base. One
Did you spot the difference in the title? (for me, it took some time)
I encountered a problem that took me some time to debug where a plug-in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.