Server object error 'ASP 0177 : 80004005'

L

Lars Schouw

When I run an ASP script I have I get this error in the browser:

Server object error 'ASP 0177 : 80004005'

Server.CreateObject Failed

/Gateway/gmticket/gmtickethelper.asp, line 114

Unspecified error

WHAT DOES THIS ERROR TELL ME?

The ASP code looks like this:

function initialize
initialize = false
set myagent = server.createobject(classid_agent)
'response.write( classid_agent )
'response.write( "initialize called")
valid_user = myagent.create(session("context"))
set myagent = nothing
if valid_user = 0 then exit function
gvar_mycompid = request("mycompid")
gvar_myclassid = request("myclassid")
'response.write( gvar_myclassid )

set gvar_oreport= server.createobject(gvar_myclassid)
' DOTO: hack since GMTicket.JGBond does not work.
'set gvar_oreport= server.createobject("GMTicket.JGBond.1")
'Response.write (gvar_oreport.GetContent())


if gvar_oreport.setowner(session("user_id")) = 0 then
response.write("unknown error: failed to initialize server.")
set gvar_oreport = nothing
exit function
end if
initialize = true
end function


The object name GMTicket.JGBond will be passed intop the createobject call.
When I do this GMTicket.JGBond.1 it works!

I also tried this from C++ and confirmed that it works:
// testGateway20.cpp : Defines the entry point for the console application.
//

// #include <afxdisp.h>
#include "stdafx.h"
#include "../Gateway20/Gateway20.h"
#include "../GMTicket/GmTicket.h"

int main(int argc, char* argv[])
{
long nAnswer;

HRESULT hr = CoInitialize(NULL);
if( SUCCEEDED(hr) )
{
CComPtr<ITicket> pObj;
hr = pObj.CoCreateInstance(OLESTR("GMTicket.JGBond.1"));
if( SUCCEEDED(hr) )
{
int iRet;
hr = pObj->IsEof(&iRet);
if( SUCCEEDED(hr) )
printf("IsEof call succeeded\n");
 
L

Lars Schouw

After some more debugging I found out that I some times pass in an
empty string to the Server.CreateObject call.
I managed to check for that so that I at least get an error message
now!

Lars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top