|
 |
asp_components thread: problems with Server.CreateObject
Message #1 by "David Askov" <mapgeek@h...> on Sat, 17 Feb 2001 00:05:16
|
|
I'm trying to execute the code in the Wrox book "Beginning Components for
ASP". I've created a dll "WX2882.dll" and registered it successfully (or
at least regsvr32 told me it did it successfully). I can reference my DLL
in VB and use it in a VB app without any problems. I'm trying to use my
component in ASP, running under PWS. The component is called as follows:
Set objWX2882 = Server.CreateObject("WX2882.Insurance")
I get the following error message:
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/ASPComponents/chapter2/insurance.asp, line 93
Invalid class string
From my web searches, there are 3 basic problems that I've seen.
1) The DLL's not registered, which mine seems to be.
2) Spelling - I've tried various alternatives to capitalization, but it's
spelled correctly.
3) Permissions - everone has full control on this dll and all the
directories above it.
Anyone have any ideas for me? THANKS!
David
Message #2 by Imar Spaanjaars <Imar@S...> on Sat, 17 Feb 2001 14:17:01 +0100
|
|
There are a few things I can think of that can go wrong. A few wild
guesses, though, but you never know:
- Is the classname indeed insurance? I don't have the book anymore, but I
still had the code. It looks to me that the class name should be
Insurance_1, so try this instead:
Set objWX2882 = Server.CreateObject("WX2882.Insurance_1")
- Is the webserver the same machine where you created and registered the
component?
- Did you set the Class name in VB / C++ to Insurance
- Did you create the right kind of object (Active X Dll in VB)??
Hope this helps,
Imar
At 12:05 AM 2/17/2001 +0000, you wrote:
>I'm trying to execute the code in the Wrox book "Beginning Components for
>ASP". I've created a dll "WX2882.dll" and registered it successfully (or
>at least regsvr32 told me it did it successfully). I can reference my DLL
>in VB and use it in a VB app without any problems. I'm trying to use my
>component in ASP, running under PWS. The component is called as follows:
>Set objWX2882 = Server.CreateObject("WX2882.Insurance")
>
>I get the following error message:
> Server object error 'ASP 0177 : 800401f3'
> Server.CreateObject Failed
> /ASPComponents/chapter2/insurance.asp, line 93
> Invalid class string
>
> From my web searches, there are 3 basic problems that I've seen.
>1) The DLL's not registered, which mine seems to be.
>2) Spelling - I've tried various alternatives to capitalization, but it's
>spelled correctly.
>3) Permissions - everone has full control on this dll and all the
>directories above it.
>
>Anyone have any ideas for me? THANKS!
>
>David
Message #3 by "David Askov" <mapgeek@h...> on Sun, 18 Feb 2001 23:07:06
|
|
It was called "Insurance_1" in their sample code that I downloaded from
them. I had made my own class, named "Insurance", which worked just fine
from VB, but not from ASP. Anyhow, I just tried it on PWS (using their
code this time) at home and it works just fine... Go figure. Thanks.
> - Is the classname indeed insurance? I don't have the book anymore, but
I
> still had the code. It looks to me that the class name should be
> Insurance_1, so try this instead:
Message #4 by mbrown@d... on Tue, 20 Feb 2001 16:37:36
|
|
This may sound irrelevant, but did you add a reference to the component in
your global.asa? If you're using visual interdev, it's as simple as going
to project->references and checking the component in the dialog.
I think Dreamweaver allows you to do the same. I'm not sure how it works
however.
Other than that you would have to find the components GUID in the
registry, and add the reference by hand to the global.asa
Sincerely,
Michael
> I'm trying to execute the code in the Wrox book "Beginning Components
for
> ASP". I've created a dll "WX2882.dll" and registered it successfully (or
> at least regsvr32 told me it did it successfully). I can reference my
DLL
> in VB and use it in a VB app without any problems. I'm trying to use my
> component in ASP, running under PWS. The component is called as follows:
> Set objWX2882 = Server.CreateObject("WX2882.Insurance")
>
> I get the following error message:
> Server object error 'ASP 0177 : 800401f3'
> Server.CreateObject Failed
> /ASPComponents/chapter2/insurance.asp, line 93
> Invalid class string
>
Message #5 by Robert Chartier <rchartierh@a...> on Tue, 20 Feb 2001 11:42:20 -0500
|
|
double check the object, and make sure that "WX2882.Insurance" is for sure
the proper ProgId. .that is make sure the class within the object exists,
and your spelling it correctly.
At 11:37 AM 2/20/01, you wrote:
>This may sound irrelevant, but did you add a reference to the component in
>your global.asa? If you're using visual interdev, it's as simple as going
>to project->references and checking the component in the dialog.
>
>I think Dreamweaver allows you to do the same. I'm not sure how it works
>however.
>
>Other than that you would have to find the components GUID in the
>registry, and add the reference by hand to the global.asa
>
>Sincerely,
>Michael
>
> > I'm trying to execute the code in the Wrox book "Beginning Components
>for
> > ASP". I've created a dll "WX2882.dll" and registered it successfully (or
> > at least regsvr32 told me it did it successfully). I can reference my
>DLL
> > in VB and use it in a VB app without any problems. I'm trying to use my
> > component in ASP, running under PWS. The component is called as follows:
> > Set objWX2882 = Server.CreateObject("WX2882.Insurance")
> >
> > I get the following error message:
> > Server object error 'ASP 0177 : 800401f3'
> > Server.CreateObject Failed
> > /ASPComponents/chapter2/insurance.asp, line 93
> > Invalid class string
> >
>
Robert Chartier
Author, AspFree.com
xxx-xxx-xxxx
rchartierh@a...
http://www.aspfree.com/devlinks
http://www.aspfree.com/authors/robert
http://www.aspalliance.com/nothingmn
|
|
 |