PRB: MAPI_E_FAILONEPROVIDER Accessing Public Folder Through ASP

ID: Q189533

The information in this article applies to:

SYMPTOMS

When attempting to access a property or the Folders collection of the Public Folder Information store from an Active Server Pages (.asp) page, the following error may occur:

   MAPI_E_FAILONEPROVIDER (8004011D).

CAUSE

Here are two possible reasons for this error:

RESOLUTION

These resolutions match the causes listed in the CAUSE section:

1. For information and sample code on how to properly access folders of the

   Public Folder Information store, please see the following article in the
   Microsoft Knowledge Base:

      ARTICLE-ID: Q178552
      TITLE     : HOWTO: View Public Folder Contents from an ASP Page

2. Verify the following to ensure proper permissions to the Exchange
   Server. For simplicity, this article assumes that Internet Information
   Server (IIS) is on the same computer as the Exchange Server.

   Determine the authentication being used by IIS for this .asp page:

      - Windows NT Challenge/Response or Basic Authentication:

        The Windows NT User that is running the .asp page must have
        appropriate permissions to the mailbox that the .asp page is
        logging onto. Verify that the Exchange or Outlook clients can open
        the mailbox and public folders without being prompted for
        authentication.

    - Anonymous Access:

      If you are accessing IIS as the Anonymous user, you should either
      logon to the Exchange Server as an Anonymous user or follow
      the steps in the following article in the Microsoft Knowledge Base:

        ARTICLE-ID: Q179332
        TITLE     : HOWTO: Programmatically Gain Anonymous Access
                    to Public Folders

      To logon to Exchange as an anonymous user, please see the
      instructions in the Remarks section of the "Logon Method (Session
      Object)" article in the Microsoft Developer Network (MSDN) Library.

    - You may use the following Visual Basic Scripting Edition code in your
      .asp to help you verify the authentication method and user:

         Sample Code
         -----------

         <%
           Option Explicit
           Response.Expires = 0

           Function BAuthenticateUser
              Dim strAT
              On Error Resume Next

              BAuthenticateUser = False
              strAT = Request.ServerVariables("AUTH_TYPE")

              Response.Write "Authentication: " & strAT & "<br>"
              Response.Write "NT User: " & _
                     Request.ServerVariables("LOGON_USER") & "<br>"

              If InStr(1, "_BasicNTLM", strAT, vbTextCompare) < 2 Then
                 Response.Buffer = True
                 Response.Status = ("401 Unauthorized")
                 Response.AddHeader "WWW.Authenticate", "Basic"
                 Response.End
              Else
                  BAuthenticateUser = True
              End If
           End Function

           BAuthenticateUser
         %>

   If you receive the "ASP 0115" error during your testing, you may need to
stop and start the "World Wide Web Publishing Service" and "IIS Admin Service" from the Services Control Panel before performing the preceding steps.

Additional query words: CdoE_FAILONEPROVIDER ActMsgE_FAILONEPROVIDER

Keywords          : kbole kbActMsg kbASP kbCDO kbCDO110 kbCDO120 kbCDO121 kbMsg kbVBScript kbGrpMsg 
Version           : WINDOWS:1.1,1.2,1.21
Platform          : WINDOWS
Issue type        : kbprb

Last Reviewed: April 7, 1999