473,779 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Object Required Error

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="Applicat ion"
PROGID="MSWC.MY Info"></OBJECT>
<SCRIPT Language="VBScr ipt" RUNAT="server">
Sub Application_onS tart()
objMyInfo.vDail yBanner="The Big News Today is..."
Dim vMyVar
vMyVar="Some text stored in the Application"
Application("st oredtext")=vMyV ar
End Sub
</SCRIPT>
index.htm
<HTML>
<HEAD><TITLE>Sh owing Application Variables</TITLE>/HEAD>
<BODY>
<H2>The Daily Banner Headlines</H2>
<%
objMyInfo.vDail yBanner="My Personal News is"
vDayBan=objMyIn fo.vDailyBanner
Response.Write( vDayBan)&":"
vMVr=Applicatio n.Contents("sto redtext")
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
Jul 19 '05 #1
3 5882
> I browse into the directory with Internet Explorer and I click index.asp.

First of all, don't do that. To run an ASP page, you *TYPE* the URL into
the browser, e.g. http://localhost/index.asp
objMyInfo.vDail yBanner="The Big News Today is..."
Can you explain why you think you need the MyInfo component to store text in
application scope?
PS1: My platform information is: Windows XP Pro, IIS 5.1, IE6


Also, from http://www.aspfaq.com/2413, which describes this error:

Active Server Pages, ASP 0134 (0x80004005)
The object has an invalid ProgID of 'MSWC.MyInfo'

"This can happen if you try to use the default global.asa that ships with
IIS 5.1 on Windows XP. XP doesn't ship with the MSWC.MyInfo object by
default, so the best solution is to rename the global.asa so it stops
causing problems. In the default web root, you really don't need a
global.asa anyway... and if you do, it should be a lot more barebones than
that one. "

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #2
>First of all, don't do that. To run an ASP page, you *TYPE* the URL into
the browser, e.g. http://localhost/index.asp
Ok I type the URL directly but the result is the same
objMyInfo.vDai lyBanner="The Big News Today is..."
Can you explain why you think you need the MyInfo component to store text
in application scope?
I have no idea. The book sais so. The idea is to show how to retrieve data
and variables from global.asa and it was supposed to work

"This can happen if you try to use the default global.asa that ships with
IIS 5.1 on Windows XP. XP doesn't ship with the MSWC.MyInfo object by
default, so the best solution is to rename the global.asa so it stops
causing problems. In the default web root, you really don't need a
global.asa anyway... and if you do, it should be a lot more barebones than
that one. "


There is not a global.asa inside the default web root. However do I have to
put my own global.asa to the default web root in order to work?
Jul 19 '05 #3
Scrap the stupid MyInfo code.

Global.asa:

<script language=vbscri pt runat=server>
sub application_ons tart
application("fo o") = "splunge"
end sub
</script>

Any ASP page within the same site/application folder:

<%=application( "foo")%>

If this doesn't work, see

No offense to ASP authors who may be lurking, but ASP books are typically
the worst place to learn how to code in ASP (this includes the ASP books to
which I've contributed). They are almost exclusively comprised of
inefficient and/or non-working examples that demonstrate superfluous,
non-realistic and non-real-world scenarios.

Better to peruse some web sites, where you might not always escape the
above, but you'll find some good examples as well -- and they won't all be
obsolete. Here are some starting points:

http://www.aspfaq.com/2183

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
24677
by: Dave Hammond | last post by:
I've got what should be a simple assignment of either an element value or a default string to a variable, but when the element doesn't exist I get an "Object required" error rather than an assignment of the default value. I originally used the simple statement: var v = document.getElementById('foo').value || parent.document.getElementById('foo').value || 'unknown';
0
9781
by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView id="TreeView1" Height="520" AutoPostBackOnNodeMove="false" DragAndDropEnabled="true" NodeEditingEnabled="False" KeyboardEnabled="true" CssClass="TreeView" NodeCssClass="TreeNode" SelectedNodeCssClass="SelectedTreeNode" HoverNodeCssClass="HoverTreeNode" NodeEditCssClass="NodeEdit"
9
1651
by: Remulac | last post by:
Hello, I'm trying to get the value out of a dropdown list box and assign it to a variable. When I click on the list box, I invoke this line of code. I get the error, "Object reference not set to an instance of an object". The same list box is referenced successfully in the form load. Does anyone know what might cause this problem?
3
2441
by: Adriano | last post by:
Hello, when I try to print something, either DataGrid or from Crystal Report viever the folowing error message appears and cancels printing: Object reference not set to an instance of an object :(((( Anyone pls help me to solve this problem!!! thanks in advance,
0
1912
by: Deepak C.G via .NET 247 | last post by:
I want to dispose the image object in my child form, unless I won't dispose this object i can't delete the image file in my folder. I get this error in MDIparent form "An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll" "Additional information: Invalid parameter used." Here is my code:-
8
2477
by: ST | last post by:
Hello everyone, Can anyone help me with this error above when I debug my web app project in vstudio.net?? I can't figure it out! It was working fine for months, and now all of a sudden it's not!! This is the error: biopsy.searchsubject.btnSubject_Click(Object Sender, EventArgs e) in C:\INetPub\WWWRoot\biopsy\searchsubject.aspx.vb:198 System.Web.UI.WebControls.Button.OnClick(EventArgs e)
1
8370
by: Don | last post by:
I'm getting the following exception displayed in the task list at design time for my project: "Code generation for property 'Controls' failed. Error was: 'Object reference not set to an instance of an object.'" I've traced the problem to a custom control I created that inherits from Inherits System.Windows.Forms.TextBox. In this custom control, I have two constructors. I'm not sure why I created the second constructor -- it was so...
4
3661
by: ink | last post by:
Hi All I am relatively new to doing this and i think that i am making some king of school boy error. The error i am getting is on the following line of code. XmlSerializer xs = new XmlSerializer(typeof(ImportRecord));
4
2183
by: livmacca | last post by:
Hi, I am new to VB .Net programming and is trying to create a webpage. I encountered the following error and is totally clueless on how to make it work: ==================ERROR================================== Object reference not set to an instance of an object. Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the...
14
3269
by: chromis | last post by:
Hi, I've been trying to implement a more OOP oriented approach to dealing with user security on one of my websites, and I am trying to validate the user against an array of roles, however I am struggling with a type error: The argument ROLES passed to function setRoles() is not of type array. If the component name is specified as a type of this argument, the reason for this error might be that a definition file for such component...
0
10139
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6727
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5504
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.