Solved

ASP Problem.

Posted on 2001-06-12
16
266 Views
Last Modified: 2008-02-01
I have actually created some components using Visual Basic 6.0. I have used the ActiveX.dll option to create
a project which I would be calling from my ASP application. However each time I attemp to open my
ASP webpage an error appears at this section in my
asp webpage:
----------------------------------------------------------

Server object error 'ASP 0177 : 800401f3'

CreateObject Failed

/leap.asp, line 11

Invalid class string

----------------------------------------------------------

I am using a webserver over the Internet (Payed one).
How do I solve this problem. Your help is kindly appreciated.


Regards

Eugene
0
Comment
Question by:eugene007
  • 5
  • 5
  • 4
  • +1
16 Comments
 
LVL 5

Expert Comment

by:GeoffKell
Comment Utility
Your DLL is not registered on the server.

To access the classes in your DLL it must first be registered using RegSvr32. If you don't know how to do this I suggest you contact your provider and ask for assistance.

Regards
GK
0
 
LVL 20

Expert Comment

by:Silvers5
Comment Utility
GeoffKell is correct.. but I doubt that a hosting service co will register your dll on their site since it might be a security breach for them.. you should convince them that your component is safe..
0
 

Expert Comment

by:steve
Comment Utility
If the Dll is not registered then error should be;

"Server object, ASP 0177 (0x800401F3)Invalid ProgID"

..Assuming code similar to below:
     Set ThisComponent=Server.CreateObject("dll.class")

If you have FTP access to your web-site then copy your
dll across along with an asp page with the following
contents:

<%
  OPTION EXPLICIT
   Dim DllPath,WshShell
 
   DllPath= """" &  Server.MapPath("/dll/")
   DllPath=DllPath & "\test1.dll" & """"
   response.write(DllPath)

   Set WshShell=CreateObject("WScript.Shell")
   WshShell.Run "regsvr32 /s " & DllPath,0

   response.end
 %>

To register dll simply run this page through your browser:
ie http:\\yourwebsite\dll\reg.asp *

*assumes droppped new dll in folder "dll"
0
 
LVL 5

Expert Comment

by:GeoffKell
Comment Utility
Hi steve,
Please do not propose answers it is against EE etiquette. Read the information at the bottom of the page re Tips on Comments versus Answers.

Post as a comment then leave the choice of picking the most appropriate comment to the questioner.

Proposing answers removes the question from the active list which takes it out of focus of the topic experts. It also brings you to the attention of the topic moderators.

Regards
GK
0
 
LVL 20

Expert Comment

by:Silvers5
Comment Utility
Besides steve.. regsvr needs administrative rights to be performed, what the IUSR leaks.. so your method will fail and the ftp account will be logged in the event viewer.. thus lots of sys admins take this as a hack attempt.
0
 
LVL 20

Expert Comment

by:Silvers5
Comment Utility
logged into the NT logs I meant..
0
 

Author Comment

by:eugene007
Comment Utility
I have tried steves method, but still it does not work.
I am getting the same error..:)

Regards

Eugene
0
 
LVL 20

Expert Comment

by:Silvers5
Comment Utility
I see GeoffKell fully answered your question
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Expert Comment

by:steve
Comment Utility
Re:posting as an "ANSWER"...
Apologies should be comments as per GK "comment"

Silver5:
This code has never failed me, so I assume you have not
tried it.
I can assure you the IUSER_"MACHINE" account happily runs regsvr32.

I have several web-sites in both UK and Australia which
rely on successful 'remote' registration of dll components.
I have no control or any contact with the administrators
of these servers.
The code above registers the dlls every time.

Maybe I'm simply exploiting sloppy admins but if your'e
coding rapidly changing dlls its sooooo convienient!

PS.
 The dlls are tested/registered on our own NT/WIN2000     servers  prior to "remoting" but I take the point about
it being a 'hack'.
 Lords knows it gives me the shivers thinking about what
 could be put in a dll and let loose.
 However let me stress, for somebody 'responsible' it's
 a fantastic loophole.



Regards

  Steve    




 
 

0
 
LVL 20

Expert Comment

by:Silvers5
Comment Utility
>I have several web-sites in both UK and Australia which
rely on successful 'remote' registration of dll components

it seems a lazy admin at your site included the IUSR in the admin group
0
 

Author Comment

by:eugene007
Comment Utility
project name: WroxCommerce
Class name: Visit
This code is placed in Visual Basic ActiveX Dll.
I have created the dll, class and project.

Option Explicit

Private m_strSiteName As String
Private m_strMailDomain As String
Private m_strDBString As String

Public Sub Configure(ByVal strSiteName As String, ByVal strMailDomain As String, ByVal strDBString As String)
    m_strSiteName = strSiteName
    m_strMailDomain = strMailDomain
    m_strDBString = strDBString
End Sub

Public Sub Shutdown()

End Sub

Private Sub Class_Terminate()
    Shutdown
End Sub



-----------------------------------------------------------

ASP name: WroxCommerceTest.asp



<% option explicit %>
<HTML>
<HEAD>
<TITLE>WroxCommerce</TITLE>
</HEAD>
<BODY>

<%
        Dim objVisit
        set objVisit = Server.CreateObject("WroxCommerce.Visit")
        objVisit.Configure "J's Coffe", "Joscoffe.com", "driver=SQL " &_
        "Server;DATABASE=JoCoffe;UID=JoCoffeeWeb;PWD=eermlate;SERVER=localhost"
%>

<b>Interesting HTML here!</b>

<%
      objVisit.Shutdown
      set objVisit = Nothing
%>

</BODY>
</HTML>


----------------------------------------------------------

I placed everything in the root directory of my webserver,
and the result was an error.


Server object error 'ASP 0177 : 800401f3'

CreateObject Failed

/leap.asp, line 11

Invalid class string


0
 

Author Comment

by:eugene007
Comment Utility
<%
 OPTION EXPLICIT
  Dim DllPath,WshShell
 
  DllPath= """" &  Server.MapPath("/dll/")
  DllPath=DllPath & "\test1.dll" & """"
  response.write(DllPath)

  Set WshShell=CreateObject("WScript.Shell")
  WshShell.Run "regsvr32 /s " & DllPath,0

  response.end
%>


This code worked well. But the results was the same.
0
 
LVL 5

Accepted Solution

by:
GeoffKell earned 47 total points
Comment Utility
eugeune007 - Have you contacted your ISP and asked advice about the registration of ActiveX components.

To summarise :-

1) The "Invalid class string" is being returned because your DLL has not been registered using the RegSvr32 utility which will add the appropriate keys to the registry to enable the reference to your class used in the Server.CreateObject call to be resolved.

2) Whilst steve's method may well work if sufficient privileges are available as has been discussed, it is unlikely that your provider is going to give you these for security reasons stated by Silvers5.

You really do need to speak to your provider as in order to use your component it must be registered.

Whilst you are waiting for a response you could use Personal Web Server (PWS) to test your ASP and components on your local machine.

There would be no need to register the component on your machine assuming that you built the DLL on that machine as the act of building it will register it for you.

Regards
GK
0
 
LVL 5

Expert Comment

by:GeoffKell
Comment Utility
eugeune007 - I would also advise you to reject steve's answer to put your question back into the list of unanswered questions where it may receive more attention.

Regards
GK
0
 

Author Comment

by:eugene007
Comment Utility
I hope to receive a solution from all of you guys..:)

Regards

Eugene
0
 

Author Comment

by:eugene007
Comment Utility
ok, I will contact my server guys and wait for their reply. This server guys of mine takes atleast 1 week
to reply my mails..:)

Regards

Eugene
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now