View Single Post
  #3 (permalink)  
Old July 22nd, 2003, 10:44 AM
ne0 ne0 is offline
Registered User
 
Join Date: Jul 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
Here is the code of the default.asp:

<%@LANGUAGE="VBScript"%>
<HTML>
<HEAD>
<TITLE>The ASP Installable Components</TITLE>
<STYLE TYPE="text/css">
BODY {font-family:Tahoma,Arial,sans-serif; font-size:10pt}
.heading {font-family:Tahoma,Arial,sans-serif; font-size:14pt; font-weight:bold}
.subhead {font-family:Tahoma,Arial,sans-serif; font-size:12pt; font-weight:bold; padding-bottom:5px}
.cite {font-family:Tahoma,Arial,sans-serif; font-size:8pt}
</STYLE>

</HEAD>
<BODY BGCOLOR="#FFFFFF">
<SPAN CLASS="heading">The ASP Installable Components</SPAN>

<DIV CLASS="subhead">This menu is created using the Content Linking Component</DIV>
<%
'create an instance of a Content Linking object
Set objNextLink = Server.CreateObject("MSWC.Nextlink")
%>
<UL>
<%
'get the number of entries in the menu file
intCount = objNextLink.GetListCount("contlink.txt")
'loop through the entries
For intLoop = 1 To intCount %>
  <LI>
  <A HREF="<% = objNextLink.GetNthURL("contlink.txt", intLoop) %>">
  <% = objNextLink.GetNthDescription("contlink.txt", intLoop) %>
  </A>
<%
Next
%>
</UL><P>
The content of the file <B>contlink.txt</B> that defines this menu is:<PRE>
<%
'create an instance of a FileSytemObject object
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
'open the text file as a TextStream object
Set objTStream = objFSO.OpenTextFile(Server.MapPath("contlink.txt") , ForReading)
'read whole file
Response.Write objTStream.ReadAll
objTStream.Close
%>
</PRE>

<SPAN CLASS="cite">&copy;1999 <A CLASS="cite" HREF="http://www.wrox.com/">Wrox Press</A> -
<A CLASS="cite" HREF="http://webdev.wrox.co.uk/default.asp?bookcode=2610">Professional ASP 3.0</A> (ISBN: 1-861002-61-0)</SPAN>
</BODY>
</HTML>


And this is the original global.asa file :


<!-- declare instance of the ASP Counters component with application-level scope
-->
<OBJECT ID="objCounters" RUNAT="Server" SCOPE="Application"
PROGID="MSWC.Counters">
</OBJECT>

<!-- declare instance of the ASP MyInfo component with application-level scope
-->
<OBJECT ID="objMyInfo" RUNAT="Server" SCOPE="Application" PROGID="MSWC.MyInfo">
</OBJECT>

<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

Sub Application_onStart()
End Sub

Sub Application_onEnd()
End Sub

Sub Session_onStart()
End Sub

Sub Session_onEnd()
End Sub

</SCRIPT>


 I have removed the <OBJECT> tag for the MyInfo component(because this componenent is not included in IIS 5.1 which I'm running) and now the code is :


<!-- declare instance of the ASP Counters component with application-level scope
-->
<OBJECT ID="objCounters" RUNAT="Server" SCOPE="Application"
PROGID="MSWC.Counters">
</OBJECT>

<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

Sub Application_onStart()
End Sub

Sub Application_onEnd()
End Sub

Sub Session_onStart()
End Sub

Sub Session_onEnd()
End Sub

</SCRIPT>

This is the error when I try to open the default.asp page with the <OBJECT> tag for MyInfo in the global.asa :

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

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

Technical Information (for support personnel)

Error Type:
Active Server Pages, ASP 0134 (0x80004005)
The object has an invalid ProgID of 'MSWC.MyInfo'.
//global.asa, line 9


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Page:
GET /Default.asp

More information:
Microsoft Support


 When I remove the <OBJECT> tag for MyInfo and try to open the page again, the browser starts loading but... It doesn't open anything, even an error message.

Sorry for my elementary questions but still I'm not very good at ASP :)

With many thanks,
Rangel