Solved

ASP Problem.

Posted on 2001-06-12
16
267 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
ID: 6180153
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
ID: 6180177
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
ID: 6180361
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
ID: 6180471
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
ID: 6180512
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
ID: 6180515
logged into the NT logs I meant..
0
 

Author Comment

by:eugene007
ID: 6180594
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
ID: 6180625
I see GeoffKell fully answered your question
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Expert Comment

by:steve
ID: 6181410
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
ID: 6181494
>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
ID: 6182071
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
ID: 6182107
<%
 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
ID: 6182139
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
ID: 6182148
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
ID: 6182552
I hope to receive a solution from all of you guys..:)

Regards

Eugene
0
 

Author Comment

by:eugene007
ID: 6182580
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Classic ASP - cannot get to correct path 17 67
SMS AddAttachment Protocol Error Classic ASP 10 38
Auto Submit on dropdown box 3 57
Server Timeout with Loop 6 38
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…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

864 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

19 Experts available now in Live!

Get 1:1 Help Now