IISSample.Asp2Htm and Form Error

I am having some major problems trying to customize this asp page.  Pasted below is the original code.  For some reason the form is not posting the "UnivID" to the asp page.  I keep getting error page 1.  (I put that in so I could see where it was failing)  If I comment that line out then I get the following error

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/nsurequest.asp, line 21

Invalid class string

I did some research and it said that I might need Microsoft resource kit installed.  I did this and rebooted and I get the same error.  So I guess this is a two part question. Why is the value "UnivID" not getting posted and what is the line 21 error.  

Html Form:

<form onsubmit="return validateForm(this)" method="POST" action="nsurequest.asp">
<p>University ID:<input type="text" name="UnivID" size="20"><br>
Last name:<input type="text" name="LastName" size="20"><br>
<input type="submit" value="Check my record" name="submit"></p>

ASP Code:

Response.Buffer = true ' because of Redirect later
'This function takes a string, searches for it in the patroninfo string, and returns
'the information between that string and the string "<BR>".

Function FindData(srchstr)
x = InStr(1, patroninfo, srchstr, 1)
if x = 0 then ' This means there was no occurrence of the string in the target
FindData = "No information on file."
y = InStr(x, patroninfo, "<BR>", 1)
z = Len(srchstr)
FindData = Mid(patroninfo, x + z, y - x - z)
end if
End Function

'Redirect user to the signin page if they are not submitting UnivID or LastName info.
if not Request.Form("UnivID") then Response.Redirect("error1.htm")
if Request.Form("LastName") = "" then Response.Redirect("error2.htm")
Set objASP2HTM = Server.CreateObject("IISSample.Asp2Htm") 'Create an ASPToHTM object

'Use the URL method of the object to pass the user's ID number to the INNOPAC
objASP2HTM.URL("http://novacat.nova.edu:4500/PATRONAPI/" & Request.Form("UnivID") & "/dump")
patronInfo = objASP2HTM.Body

'Store body text in the patroninfo variable
'If no patron record with the submitted ID number, INNOPAC will return an error screen
errmsg="ERRMSG=Requested record not found"

'If error message found within body string, value will be greater than zero, or zero if not found

errchk = InStr(1, patroninfo, errmsg, 1)
Response.Write("<html><head><title>Page title goes here</title></head>")
if errchk > 0 then
' The INNOPAC returned an error, so the record was not found

Response.Write("Text of your User Not Found error message goes here.")
' Some record was returned, so get the user's data

userName = FindData("PATRN NAME[pn]=")
userAffil = FindData("AFFIL.[p44]=")
userExpDate = FindData("EXP DATE[p43]=")

'Decide if they logged in properly by checking their lastname against that found in INNOPAC.

userLastName = Left(userName, Len(Request.Form("LastName")))
if StrComp (Request.Form("LastName"), userLastName, 1) <> 0 then
Response.Write("Text of your User Name Mismatch error message goes here.")

'Decide if they can use the service by checking for their AFFIL.

if userAffil <> "a" and userAffil <> "b" and userAffil <> "c" then
Response.Write("Text of your User Not Authorized error message goes here.")

'Decide if they can use the service by checking their Expiration Date
if IsDate(userExpDate) = False then ' The string found is not a valid date
Response.Write("User Expiration Date Invalid error message goes here.")
else ' The string is a real date
userExpDate = CDate(userExpDate) ' Convert the string to date format
if userExpDate < Date() then ' The user is expired
Response.Write("User Expired error message goes here.")
else ' Show them the page because they meet all the tests
Response.Write("Here is the actual information they need.")
end if
end if
end if
end if
end if
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Please see this link:


Hope this helps!
Taken directly from the page, in the event that you don't feel like clicking the link:

To resolve this issue, install the IIS Resource Kit components. The DLL automatically registers when the IIS Resource Kit components are installed.

You can purchase the current IIS Resource Kit components at the following Web address:

The IIS Resource Kit components are also available from the following MSDN Subscription Web page:

If the IIS Resource Kit is installed and you receive the "Server.CreateObject Failed" error message, perform the following steps:
1. Start Registry Editor (Regedt32.exe).
2. Click Edit, and then click Find and search to locate the ProgID of the object you are trying to create (For example, "MSWC.Tools" for Tools). The ProgID is located in the following registry key:
3. Open the InprocServer32 folder located in the registry key
and locate the path and name of the DLL that is listed as the default value.
4. Click Start, click Run, and then type the following:
Regsvr32 <pathtodll>\<dllname.dll>.
5. Click Start, click Run, and then type the following: Regsvr32 <<I>DLLName.dll</I>>
6. Run the ASP page.

Good luck!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hang10zAuthor Commented:
I already tried this.. originally I was using a XP pro machine and I downloaded and installed this package.  I even did the manual reg part.  I could get step 5 to work tho, I entered it like this

Regsvr32 <I>tools.dll</I>
Regsvr32 <<I>tools.dll</I>>

and it could not find module...  so then I switched it to win 2000 server, but there is no free toolkit for it.  

I still don't understand why the script was originally coughing on the line:
if not Request.Form("UnivID") then Response.Redirect("error1.htm")

I had to comment it out.. again I did not write this and I am not a 'true' programmer, I am a network admin
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

hang10zAuthor Commented:
** Correction I could NOT get step 5 to work.
the correct method for registering a dll is to run this at the command prompt:

regsvr32 c:\mydirectory\tools.dll

obviously, you'll want to change the above code to match your appropriate local path to the DLL on your webserver.  Also, it's a good idea to stop IIS before you start messing around with registering / unregistering DLL's.  Another simple command line code for this:  iisreset /stop

and then to restart IIS: iisreset / start

iisreset alone will stop and start IIS.

Hope this helps,
hang10zAuthor Commented:
Still not working
what's not working?  the regsvr32 line?  What are you typing into the command prompt?
hang10zAuthor Commented:
No it registered fine..  still getting same asp error
did you do an iisreset after the regsvr32?
hang10zAuthor Commented:
Hm, well aside from Microsoft's suggestions on fixing it, I'm not sure how to approach this one; sorry.  Good luck.

hang10z -- what was the eventual solution to this?  

once again, sorry I wasn't able to help further...perhaps posting the answer / the method you used to finally get it to work will help future viewers.

hang10zAuthor Commented:
Basically to use this code I have to install the resource kit as stated above.. I abandoned the idea and had IT services write me a new script.  This code was written in 2000.  Damn you microsoft!!  lol
Okay --

First of all, thanks very much for the update on the solution.  If future users find this question / have the same problem, they will now know where to go.

Second, please review the grading policy for Experts-Exchange (I've pasted it below, for your reference).

I understand that in the end you had to get a new script written, etc., but since the solution provided was indeed the correct answer to the question asked, a "C" grade (the lowest possible grade that you could give) was not warranted.

Should you wish to do so, you can request a grade change by posting a question in community support:

Thanks for your consideration.

grading policy url: http://www.experts-exchange.com/Community_Support/help.jsp#hi73
-------Begin Grading Policy:----------
Ask 10 Experts this question, and you'll get 10 different answers. One thing is certain: Grading at Experts Exchange is NOT like school. Here's what EE says:

Although we use an A-D scale here at Experts Exchange, it works differently than, say, school grades. If one or more Experts' proposals are accepted as answers, they should usually be given an A or B grade, since they have taken the time to provide you with a working solution. If a possible solution is incomplete - ask for clarification or details before accepting the answer and grading it. People should not be given lower grades because of incorrect grammar or because you just accepted their answer or comment to close the question. Keep in mind, your question and any follow-up comments should be focused so that there can be a specific answer. The following is a good guideline to follow when grading:

A: The Expert(s) either provided you with a thorough answer or they provided you with a link to information that thoroughly answered your question. An "A" can also be given to any answer that you found informative or enlightening beyond the direct question that you asked.
B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution, that you were able to use, although you may have needed a bit more information to complete the task.
C: Because Experts' reliability are often judged by their grading records, many Experts would like the opportunity to clarify if you have questions about their solutions. If you have given the Expert(s) ample time to respond to your clarification posts and you have responded to each of their posts providing requested information; or if the answers, after clarification, lack finality or do not completely address the issue presented, then a "C" grade is an option. You also have the option here of just asking Community Support to delete the question.
Remember, the Expert helping you today is probably going to be helping you next time you post a question. Give them a fair chance to earn an 'Excellent!' grade and they'll provide you with some amazing support. It's also true that a "C" is the lowest grade you can give, and the Experts know that -- so use it judiciously.
-------End Grading Policy:----------

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.