Results 1 to 5 of 5
\r\n \r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n Good day,
\r\n
\r\nI have some code which works perfectly well in a macro of a spreadsheet but now need to put it into a aspx page. Unfortunately it is failing right at the very beginning. My code portion is as follows:
\r\n
\r\nPUBLIC Sub SAP
\r\n Dim LogonControl
\r\n Dim funcControl
\r\n Dim TableFactoryCtrl
\r\n Try
\r\n LogonControl = Server.CreateObject("SAP.LogonControl.1")
\r\n funcControl = Server.CreateObject("SAP.Functions")
\r\n TableFactoryCtrl = Server.CreateObject("SAP.TableFactory.1")
\r\n Catch ex As Exception
\r\n lbInformation.Text = Err.Description
\r\n End Try
\r\nEnd SUb
\r\n
\r\nIt is failing on the line LogonControl = Server.CreateObject("SAP.LogonControl.1") with the following error:
\r\nRetrieving the COM class factory for component with CLSID {B24944D6-1501-11CF-8981-0000E8A49FA0} failed due to the following error: 80040154
\r\n
\r\nSAP is installed on the Server from where the page is running and the macro in the spreadsheet when run on the server where the page is been run from works fine. I just can\'t understand why this is not working.
\r\n
\r\nThe page is a VB asp dot net page.
\r\n
\r\nPlease help.
\r\n
\r\n
\r\n\r\n \r\n\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n'; pd[6535687] = '\r\n
  • \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n #2\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n Teddy is offline\r\n\r\n \r\n \r\n Purveyor of Discontent\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Join Date
    Mar 2003
    \r\n
    Location
    The Bottom of The Barrel
    \r\n \r\n
    Posts
    6,102
    \r\n \r\n
    \r\n \r\n
    Provided Answers: 1
    \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n What does that error number mean?\r\n
    \r\n
    \r\n\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n \r\n \r\n
    oh yeah... documentation... I have heard of that.
    \r\n
    \r\n*** What Do You Want In The MS Access Forum? ***
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
  • \r\n'; pd[6535868] = '\r\n
  • \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n #3\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n plsh is offline\r\n\r\n \r\n \r\n Registered User\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Join Date
    Nov 2004
    \r\n \r\n \r\n
    Posts
    287
    \r\n \r\n
    \r\n \r\n
    Provided Answers: 1
    \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n From what I can make out it appears to have to do with Class not registered. But I don\'t understand how that can be when it works perfectly in my VB Script in Excel just not in my aspx web page.\r\n
    \r\n
    \r\n\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
  • \r\n'; pd[6641917] = '\r\n
  • \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n #4\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n plsh is offline\r\n\r\n \r\n \r\n Registered User\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Join Date
    Nov 2004
    \r\n \r\n \r\n
    Posts
    287
    \r\n \r\n
    \r\n \r\n
    Provided Answers: 1
    \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n VERY old reply but after all these years of using a work around I have found the solution. Ensure that the "Enable 32 bit applications" option of the Application Pool being used is set to TRUE. So simple in the end, but caused so much havoc over the years. Just in case anyone ever needs an answer now you have one. Have tested on multiple servers, set it to FALSE, false, set it to TRUE, instantly works. That is what I have found anyway with the SAP.LogonControl.1 anyway.\r\n
    \r\n
    \r\n\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
  • \r\n'; pd[6641919] = '\r\n
  • \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n #5\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n plsh is offline\r\n\r\n \r\n \r\n Registered User\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Join Date
    Nov 2004
    \r\n \r\n \r\n
    Posts
    287
    \r\n \r\n
    \r\n \r\n
    Provided Answers: 1
    \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n In IIS you may need to run the following, newer IIS has Advanced options where you can set it.
    \n
    \ncscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 true
    \r\n
    \r\n
    \r\n\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
  • \r\n'; // next/previous post info pn[6535631] = "6641919,6535687"; pn[0] = ",6535631"; pn[6535687] = "6535631,6535868"; pn[6535868] = "6535687,6641917"; pn[6641917] = "6535868,6641919"; pn[6641919] = "6641917,6535631"; // cached usernames pu[0] = guestphrase; pu[95619] = "plsh"; pu[27102] = "Teddy"; // -->

    Threaded View

    1. #1
      Join Date
      Nov 2004
      Posts
      287
      Provided Answers: 1

      Unanswered: Connecting to SAP from aspx web page

      Good day,

      I have some code which works perfectly well in a macro of a spreadsheet but now need to put it into a aspx page. Unfortunately it is failing right at the very beginning. My code portion is as follows:

      PUBLIC Sub SAP
      Dim LogonControl
      Dim funcControl
      Dim TableFactoryCtrl
      Try
      LogonControl = Server.CreateObject("SAP.LogonControl.1")
      funcControl = Server.CreateObject("SAP.Functions")
      TableFactoryCtrl = Server.CreateObject("SAP.TableFactory.1")
      Catch ex As Exception
      lbInformation.Text = Err.Description
      End Try
      End SUb

      It is failing on the line LogonControl = Server.CreateObject("SAP.LogonControl.1") with the following error:
      Retrieving the COM class factory for component with CLSID {B24944D6-1501-11CF-8981-0000E8A49FA0} failed due to the following error: 80040154

      SAP is installed on the Server from where the page is running and the macro in the spreadsheet when run on the server where the page is been run from works fine. I just can't understand why this is not working.

      The page is a VB asp dot net page.

      Please help.

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •