Troubleshooting Error Code 0x80040115

There are many situations when you may receive the error code 0x80040115.

Such situations may include:
– An attempt to save an activity in the Microsoft Dynamics CRM client.
– The xp_sendmail extended stored procedure does not run.
– The Information Store service crashes on an Exchange Server 2003.
– RPC data may be blocked and Outlook may not start in Windows Server.
– Event ID 8207 repeatedly appears in the application log.
– Event IDs When Starting the Information Store with Blank Databases.
– Multiple Exchange Server 2007 services do not start when you upgrade.
– Microsoft Exchange Server – Sending” reported error.
– The connection to the Exchange Server computer was lost.

Here are some ways to resolve some of these errors.

Looking at the first situation where you were trying to save an activity in Microsoft Dynamics CRM 3.0 client for Microsoft Office Outlook, you may receive the following error message:

Microsoft CRM Unhandled Error Details:
Server Error in ‘/’ Application.

Exception from HRESULT: 0x80040115.
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.Runtime.InteropServices.COMException:
Exception from HRESULT: 0x80040115.

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:

[COMException (0x80040115): Exception from HRESULT: 0x80040115.] Microsoft.Crm.Platform.ComProxy.CRMContactClass.Create(CUserAuth& Caller, String Contact) +0
Microsoft.Crm.Application.Platform.Contact.InternalCreate(String xml) +268
Microsoft.Crm.Application.Platform.Entity.Create() +109
Microsoft.Crm.Application.Forms.AppForm.RaiseDataEvent(FormEventId eventId) +408
Microsoft.Crm.Application.Forms.EndUserForm.Initialize(Entity entity) +57
Microsoft.Crm.Application.Forms.CustomizableForm.Execute(Entity entity, String formId, String formType) +83
Microsoft.Crm.Application.Forms.CustomizableForm.Execute(Entity entity) +13
Microsoft.Crm.Web.SFA.ContactDetailPage.ConfigureForm() +244
Microsoft.Crm.Application.Controls.AppPage.OnPreRender(EventArgs e) +29
System.Web.UI.Control.PreRenderRecursiveInternal() +54 System.Web.UI.Page.ProcessRequestMain() +1499

Microsoft CRM Platform Error Report:
Error Description:
Exception from HRESULT: 0x80040115.

Error Details:
Exception from HRESULT: 0x80040115.

Error Number:
0x80040115

Source File:
Not available

Line Number:
Not available

This problem occurs if the following conditions are true:

  • You try to save one of the following activities:
    o Contact
    o Task
    o Appointment
    o Service
  • You click Go Offline in the Microsoft Dynamics CRM client for Outlook, and then you disconnect the computer that is running the Microsoft Dynamics CRM client for Outlook from the network.

The cause of the problem is because a MAPI_E_NETWORK_ERROR error stops the IMsgStore->OpenEntry function.

Note The IMsgStore->OpenEntry function is defined in the OutlookItemFinder.cpp file.

You can correct the problem by enabling the Use Cached Exchange Mode feature in Outlook. To do this, follow these steps:

  1. Start Outlook.
  2. On the Tools menu, click Account Settings.
  3. Click the e-mail account that you use, and then click Change.
  4. Click to select the Use Cached Exchange Mode check box, and then click Next.
  5. Click Finish.
  6. Click Close.

In the second situation, where the xp_sendmail extended stored procedure does not run, you may have tried to send an e-mail message by using the xp_sendmail extended stored procedure on a computer that was running Microsoft SQL Server 2000 Service Pack 2 (SP2) or later. The result was that the xp_sendmail extended stored procedure did not run successfully. You most likely received the following error message:

Server: Msg 18025, Level 16, State 1, Line 0
xp_sendmail: failed with mail error 0x80040115

This problem typically occurs when the following two conditions are present:

  • There is a loss of network connectivity between the computer that is running Microsoft SQL Server 2000 and the computer that run Microsoft Exchange Server.
  • The Exchange server is restarted after the first execution of the xp_sendmail extended stored procedure on instance of SQL Server where the error occurred.

You can resolve this problem by obtaining the latest service pack for Microsoft SQL Server 2000. For more information, review article 290211 in the Microsoft Knowledge Base.

Additionally, there is a Hotfix available on the Microsoft Support web site.

Microsoft has confirmed that this is a problem in the following Microsoft products:

  • Microsoft SQL Server 2000 Desktop Engine
  • Microsoft SQL Server 2000 Service Pack 2
  • Microsoft SQL Server 2000 Service Pack 3
  • Microsoft SQL Server 2000 Personal Edition Service Pack 3

This problem was first corrected in Microsoft SQL Server 2000 Service Pack 4.

To work around this problem, verify the network connectivity, and then resend the mail. You can set up the retry option for the xp_sendmail extended stored procedure by configuring the registry entries or by adding retry logic to your application code. To do this, use one of the following methods:

Method 1: Configure the retry option for the xp_sendmail extended stored procedure.

Method 2: Add retry logic to your application code.

When you send an e-mail message by using the xp_sendmail extended stored procedure, the xp_sendmail extended stored procedure makes many calls to the MAPI API. However, the retry option in the Microsoft hotfix is only added for a single call that caused the failure with the following error message:

HRESULT = 0x80040115

More information can be found on the Microsoft website.

Written by Mike Rede

Leave A Reply