Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > BOOK: Beginning ASP 3.0
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 7th, 2004, 02:50 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to randar
Default Chapter 6 - SetProperties.asp Problem

First of all, here is the error message I am getting:

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
    * Error Type:
      Server object, ASP 0177 (0x800401F3)
      Invalid class string
      /BegAsp/SetProperties.asp, line 4

I tried using the file from this site. I have Windows XP and am using Mozilla 1.7 and IE 6.0. I get the same problem on both. I have IIS running, and DID install MyTelephone.dll correctly. I have attempted to stop and start IIS with no change. Any suggestions?
  #2 (permalink)  
Old July 7th, 2004, 03:21 AM
Imar's Avatar
Wrox Author
Points: 72,035, Level: 100
Points: 72,035, Level: 100 Points: 72,035, Level: 100 Points: 72,035, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,079
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Can you show us the code for this example? And did you register the DLL on the server running IIS, not your local machine?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Waking The Witch by Kate Bush (Track 8 from the album: Hounds Of Love) What's This?
  #3 (permalink)  
Old July 7th, 2004, 03:36 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to randar
Default

CODE:

<%
    Option Explicit
    Dim objTelephone
    Set objTelephone = Server.CreateObject("MyTelephone.Telephone")

    objTelephone.Color = "Blue"
    objTelephone.Material = "Thermoplasitc"
    objTelephone.Weight = 22
    objTelephone.NumberOfKeys = 12

    Response.Write "Done"
    Set objTelephone = Nothing
%>


-----

And, yes, the DLL is registered to the machine running IIS. I even tried stopping and starting IIS before and after registering the DLL.
  #4 (permalink)  
Old July 7th, 2004, 03:50 AM
Imar's Avatar
Wrox Author
Points: 72,035, Level: 100
Points: 72,035, Level: 100 Points: 72,035, Level: 100 Points: 72,035, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,079
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

This looks fine to me. What is the name of the project in Visual Basic? And what is the class name? Is it Telephone?

It looks like the DLL isn't registered correctly. Did you check out the Errata section for the book to see if there is something in there about this problem??

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Track 5 by Dido and Various (Track 5 from the album: Angel) What's This?
  #5 (permalink)  
Old July 7th, 2004, 05:03 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to randar
Default

Yeah, the code is exactly as the book/the web site has it.

I do not understand what you mean by "the name of the project in Visual Basic". I am just creating a file called "SetProperties.asp" in the Windows Notepad and then trying to call it up off of the web server. The way it looks in the book, the "Telephone" is an object (probably created by MyTelephone.dll).

I have read through the error sections of the book as well as the "common problems" installing and registering a .DLL and its suggestion was to come here for help. The .DLL is sucssfully registered (according to regsvr32.

Any more ideas? Thanks.

  #6 (permalink)  
Old July 7th, 2004, 05:09 AM
Imar's Avatar
Wrox Author
Points: 72,035, Level: 100
Points: 72,035, Level: 100 Points: 72,035, Level: 100 Points: 72,035, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,079
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

That was just a guess. When you create an ActiveX DLL in Visual Basic, the Prog ID for the object is ProjectName.ClassName.
So, your VB Project is called MyTelephone while one of the classes inside the project is called Telephone. Together they make up the Prog ID: MyTelephone.Telephone

If your project or your class is named otherwise you'll get an error like the one below. This is a common issue.

If you successfully registered the DLL using regsvr32, then I am almost out of ideas. Usually, the error you get is caused by a component that is not, or not successfully registered on the server.

Maybe it's a security issue. Maybe you have a tight security policy on your system. Is the ASP account (IUSR_MachineName) allowed to access the folder where the DLL is placed?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: full nelson by Limp Bizkit (Track 4 from the album: Chocolate Starfish and the Hotdog Flavoured Water) What's This?
  #7 (permalink)  
Old July 7th, 2004, 05:47 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to randar
Default

Ah, I see. Unfortunately, I do not have a Visual Basic editor or compiler on this system, so I cannot see exactly how MyTelephone.dll was created or what is in it. I am having to trust the good authors of "Beginning Active Server Pages 3.0" to have written good code.

I don't think it is a security issue. I am running IIS and the browser from the same machine, and I have administrator rights. I tried registering the .DLL in the wwwroot directory, just to make sure, but there was still no difference.

I also tried out the next example (RetrieveProperties.asp) and got the same problem, which still points back to the .DLL, but I don't have any more ideas.

Anything else I can try? Thanks.

  #8 (permalink)  
Old July 7th, 2004, 05:59 AM
Imar's Avatar
Wrox Author
Points: 72,035, Level: 100
Points: 72,035, Level: 100 Points: 72,035, Level: 100 Points: 72,035, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,079
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

That fact that you are having Administrator privileges doesn't really say much. When IIS server up Web pages, it uses a special account, the anonymous guest account with the user name of IUSR_MachineName where MachineName is the name of your computer running IIS. It's this account that requires permissions to read and write to files in a Web application (unless you have configured the Web site differently of course).

Like I said, I am out of ideas. According to the errata, this is a known problem, but with a few work arounds. If none of these work, it's also not a permission issue and you're are not using an incorrect prog ID (which you aren't, apparently) then I don't know what's going on.

---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Condition Of The Heart by Prince and the Revolution (Track 3 from the album: Around The World In A Day) What's This?
  #9 (permalink)  
Old July 7th, 2004, 06:10 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to randar
Default

Well, I checked the IIS permissions, and it does not look like that is causing the problem. Thank you for the information regarding those permissions, as I did not know to check them.

Thanks for all of your help. Perhaps someone else will take a look at this and might be able to offer something different. Thanks again!

Anyone else?
  #10 (permalink)  
Old July 7th, 2004, 06:19 AM
Imar's Avatar
Wrox Author
Points: 72,035, Level: 100
Points: 72,035, Level: 100 Points: 72,035, Level: 100 Points: 72,035, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,079
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

One more thing: Where did you get the DLL file from? From the (unzipped) setup package, or from the Windows folder after you ran Setup.exe?

Does the file end with .dll or with .dl_??

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Wish You Could Be Me by KoRn (Track 16 from the album: Issues) What's This?
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with chapter 3 of Beginning ASP.NET2.0 C# hedgracer ASP.NET 2.0 Basics 1 April 26th, 2008 08:49 AM
ASp.NET with C#, Chapter 8 Judy BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 3 February 5th, 2008 02:23 PM
Beginning ASP 3.0, Chapter 12 (Connect.asp). Richard LaChance BOOK: Beginning ASP 3.0 4 July 24th, 2004 04:12 PM
Problem with Chapter 15 - BrowseListings.asp Giuliano BOOK: Beginning ASP 3.0 1 August 7th, 2003 01:36 PM
Professional ASP 3.0, chapter 6 ne0 All Other Wrox Books 5 July 23rd, 2003 08:48 AM



All times are GMT -4. The time now is 03:20 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.