Link to home
Start Free TrialLog in
Avatar of dhsjphd
dhsjphd

asked on

Server object, ASP 0177 (0x800401F3) Invalid Class String

First of all, I have read all of the solutions I could possibly find for this issue.  Secondly, none of them work for me.

I am using: WinXP Pro SP2, VB6, ASP

Here is a breakdown of my problem:

- I have created a custom ActiveX DLL named DLObjects with a class named DLFactory.
- I have registered this DLL
- I created a COM+ application and set the Identity to the Administrator account
- I CAN instantiate the DLL with VB6
- I CAN NOT instantiate the DLL with ASP
- I have verified it is registered
- I have verified IUSR and IWAM accounts have access to the DLL folder
- I have used other third-party DLLs without an issue

Here is the abridged code:

<%
Dim Factory
Set Factory = Server.CreateObject("DLObjects.DLFactory")  '<-- Error here.  Yes, it is spelled correctly
Set Factory = Nothing
%>

As stated before, I am able to use this DLL without issue in VB6 on the same machine.  I am also able to copy to DLL to a Win2k3 machine, register, and use it in ASP.

This is driving me completely mad as I have been programming professionally for 13 years and have NEVER had an issue that has stumped me like this... I am sure it is something simple (but my pride hopes otherwise).  Any and all insights into this issue is more than appreciated.

Please remember that I have read and tried all of the solutions for this and none have worked so please do not suggest these basic-easy-to-find-already-checked answers:

- IUSR/IWAM Permissions
- Registering DLL / COM+
- Checking the spelling

Thanks again in advance for your help!!
ASKER CERTIFIED SOLUTION
Avatar of aplimedia
aplimedia
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dhsjphd
dhsjphd

ASKER

aplimedia -

The error is:

Technical Information (for support personnel)

    * Error Type:
      Server object, ASP 0177 (0x800401F3)
      Invalid class string
      /testdll.asp, line 3

    * Browser Type:
      Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7

    * Page:
      GET /testdll.asp


I also thought that it was a permissions issue; however, I have added the IUSR and IWAM accounts to the permissions for the folder where the DLL resides... I have also tried compiling the DLL into the Inetpub folder where the ASP page executes.  I have also tried creating a COM+ application in Component Services and registering the component with an Administrator identity.

I appreciate your response... and look forward to your continued assistance in locating a solution!
Avatar of dhsjphd

ASKER

Update...

I compiled the DLL into the System32 directory with the same results.  This is where all other DLLs used in my applications are stored and used without issue.

<banging head against wall>
Avatar of dhsjphd

ASKER

Update...

Here is a sample snippet of code that DOES WORK with a DLL that resides in the same directory as the infamous DLObjects.dll:

<%
Dim Mailer
Set Mailer = Server.CreateObject("SMTPsvg.Mailer") '<-- Does not cause error
Set Mailer = Nothing
%>

However, when using the same ASP file pointing to the DLObjects.dll in the SAME folder as SMTPsvg.dll (system32) I get the error descibed in my original posting.

<%
Dim Factory
Set Factory = Server.CreateObject("DLObjects.DLFactory") '<-- Causes error
Set Factory = Nothing
%>

  :_(
Ok, I sort of take back the folder permission comment. If that were an isue the error would reflect it. Your error is consistent with the object not being registered on the machine. Now I know it is, but somehow IIS is not able to use it, or is denied access to it.

Let me take a look at the IIS control panel, you could do the same, I think the answer is there.

Aplimedia
ISAPI Filter - On the main IIS control panel

ISAPI stands for Internet Server Application Programming Interface. Basically, they are programs (non-cgi executables) written to interact & work with requets to a web server.

http://www.iis-resources.com/modules/wfsection/article.php?articleid=9

Let me know.

Aplimedia
Avatar of dhsjphd

ASKER

Aplimedia -

Thanks for the response... but I am a little confused now.  Are you suggesting that I register my DLL as an ISAPI filter to handle the IIS requests?  Or develop it as an ISAPI extension?

Currently, as I have in the past, I am using the IISScriptingContext to capture the ASP objects within my DLL to communicate with IIS and the client, therefore ecapsulating all business logic and rules into a portable, reusable object.  I have always, with this one exception, been able to use my DLLs just like any other third-party object.  I simply make the CreateObject call, the object captures the IISScriptingContext, reads the state, and handles the request.  Most of my ASP pages are simply three lines long!  This has been a highly successful way for me to develop applications.

I am annoyingly perplexed since this is not something new that I am experimenting with, rather a tried and true design.  So, I ask myself (and now the rest of you), why is it not working with this one DLObjects.dll??

So, to get back to your ISAPI comments... why are you suggesting I use ISAPI Filters/Extension?  I must admit that I am not familiar with them at all.

Thanks again for your continued assistance.....
dhsjphd -
I have built DLL's just as you have described and implemented them successfully.  From what I recall, I always would compile the DLL in the system32 directory.  I never had to set any permissions whatsoever to be able to create the objects through my ASP pages.  I do remember it being a nightmare when rebuilding an existing DLL.  I seemed to have to unregister, re-register the component, and then stop and start IIS to get it to work.  I built a batch script to automate this process during the development cycle.

I know you have stated that  you have confirmed that the DLL is registered (and clearly it is if you can instantiate it with VB), but have you tried unregistering it, and re-registering it?  Restarting IIS?  Or even just rebooting the server?  I realize that these are all obvious solutions, but figured I would throw them out there...

Avatar of dhsjphd

ASKER

peterxlane -

Thanks for the response... Yes, I have done all of the above.  Again, again, and again.  I simply have no clue why this renegade DLL is not operating properly.  I have also gone through ALL of the project settings in VB, all IIS settings, file system permissions, took a shower, had some coffee, rebooted again, scratched my head, rinsed and repeated.

The only thing I can think of that I have not tried it tossing my laptop out of the window.  But, really, I don't think that will help -- much.

Thanks again for the response.
Have you tried create a simple Hello World DLL from scratch with a different project name / class name and see if you can get that to work?
>dhsjphd

Before laptop execution, you might ry posting a question on

Home>All Topics>Operating Systems>Windows XP

This question is on the edge of ASP and much to do with the server and operating system.

Will keep looking

Kind regards

Aplimedia
Avatar of dhsjphd

ASKER

peterxlane -

I had not tried this since I have other components that were developed that are working fine.  However, just for fun, I did create a simple HelloWorld DLL in system32, registered the components, and browsed to the ASP page.

Low and behold, the same error message appears!!  What!??!

I have not dared to recompile an existing DLL to test whether this error appears afterwards.

This is becoming exponentially more frustrating.... thanks again for your assistance.
Avatar of dhsjphd

ASKER

Update...

I went to another desktop running Win2k and created another simple HelloWorld DLL, copied it to my machine, registered, and browsed to the ASP page.  Same error.  I did this to see whether it was my machine causing the problem during the compilation of the DLL... and it does not appear to be so.

Don't know if this information will help... thanks again.
Avatar of dhsjphd

ASKER

Update...

I copied my DLObjects.DLL to a Win2k desktop, registered, and browsed to the ASP page... shazam!  It works.  So, it is not a problem with the DLL but rather a problem with my OS/IIS/??

Thanks again for any assistance...
Oh, then it is a one step simple fix:

Reinstall OS

...what a nightmare! I can't imagine what is causing this issue...
Avatar of dhsjphd

ASKER

Ok... someone found a solution in one of the cross posts...

It was a permission issue on the registry key... how simple.  For more information: https://www.experts-exchange.com/questions/21615548/VB6-IIS-XP-Pro-SP2-DLL-error-in-ASP-page.html

Thanks peterxlane and Aplimedia for your assistance!  I am new to the point system... would it be customary for me to split points between the two of you for helping even though you didn't provide the solution?

Thanks again for your help.
@dhsjphd
For advice on closing the questions:

https://www.experts-exchange.com/help.jsp#hs5

Also, for future pointer questions you might like to take a look here.

https://www.experts-exchange.com/help.jsp#hi262

_____________________________________________________________

Glad you got the issue resolved, it was a real teaser. However I suspect a permissions thing from the start.

Aplimedia
Avatar of dhsjphd

ASKER

Update...

I added the IUSR and IWAM accounts to the HKEY_LOCAL_MACHINE branch with READ ONLY rights and set it to inherit all subkeys.  This keeps me from having to reset the permissions in the registry when recompiling the DLL.