At first I make a independend virtual directory wich I named app and I check
Directory Browsing in the Virtual Directory Properties. Then I create with
notepad global.asa and index.asp
global.asa
<OBJECT ID="objMyInfo" RUNAT="server" SCOPE="Application"
PROGID="MSWC.MYInfo"></OBJECT>
<SCRIPT Language="VBScript" RUNAT="server">
Sub Application_onStart()
objMyInfo.vDailyBanner="The Big News Today is..."
Dim vMyVar
vMyVar="Some text stored in the Application"
Application("storedtext")=vMyVar
End Sub
</SCRIPT>
index.htm
<HTML>
<HEAD><TITLE>Showing Application Variables</TITLE>/HEAD>
<BODY>
<H2>The Daily Banner Headlines</H2>
<%
objMyInfo.vDailyBanner="My Personal News is"
vDayBan=objMyInfo.vDailyBanner
Response.Write(vDayBan)&":"
vMVr=Application.Contents("storedtext")
Response.Write(vMVr)&"<BR>"
%>
</BODY>
</HTML>
I browse into the directory with Internet Explorer and I click index.asp.
Unfortunately I get the following error.
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/app/index.asp, line 6
I am an ASP Begginer. I wrote all these based into an ASP Begginers book.
I tried lots of times and can't get what is wrong.
I hope you can help me.
PS1: My platform information is: Windows XP Pro, IIS 5.1, IE6