473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Undefined when defined

I actually have 2 questions:

1) I am getting an error "Type 'TempClass1' is not defined"

Why?

Here is my DLL, where I have 3 classes defined outside of my Web Class:
AuthHeader, ServiceTicket and TempClass1
************************************************** ************************
<%@ WebService Class="SecureService" debug="True"%>

Imports System
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data
Imports System.Data.SqlClient

<WebService( Namespace:="http://10.0.0.25/webservices" )> _
Public Class SecureService : Inherits WebService

Public AuthenticationHeader As AuthHeader

<WebMethod()> Public Function Login( username As String, password As
String ) As ServiceTicket

End Function

End Class

Public Class AuthHeader:Inherits SoapHeader
Public SessionKey As String
End Class

Public Class ServiceTicket:Inherits AuthHeader
Public IsAuthenticated As Boolean
Public SessionKey As String
Public Expiration As DateTime
End Class

Public Class TempClass1:Inherits ServiceTicket
Public TomsClass1Name As String
End Class
************************************************** **********************

My Web page is :
************************************************** *******************
<%@ Import Namespace="Services" %>

<Script runat="Server">

Sub Page_Load
Dim objSecureService As SecureService
Dim objServiceTicket As ServiceTicket
Dim objAuthHeader As AuthHeader
Dim objTempClass1 As TempClass1

objSecureService = New SecureService
objServiceTicket = Session( "ServiceTicket" )
objTempClass1 = new TempClass1

</Script>

<html>
<head><title>TestSecureService.aspx</title></head>
<body>

<asp:Label
id="lblLuckyNumber"
EnableViewState="False"
Runat="Server" />

</body>
</html>
************************************************** ********************

Why do I only get an error on TempClass1 and not on the others?

2) In my Web page I have:

<%@ Import Namespace="Services" %>

But I don't have Namespace Services. Is this an MS Namespace?

Thanks,

Tom
Apr 3 '06 #1
1 1131
"tshad" <ts**********@ftsolutions.com> wrote in message
news:uv**************@TK2MSFTNGP11.phx.gbl...
I actually have 2 questions:

1) I am getting an error "Type 'TempClass1' is not defined"

Why?
It turns out I can modify the Login function to all three class without any
problem, like:
************************************************** *****************
<WebMethod()> Public Function Login( username As String, password As
String ) As ServiceTicket
Dim objServiceTicket As new ServiceTicket
Dim objAuthHeader As new AuthHeader
Dim objTempClass1 As new TempClass1

End Function
************************************************** ****************

So I can call all these classes, which makes sense as they are all in the
same file.

But why can I use ServiceTicket and AuthHeader, but not TempClass1??????

They are defined the same way. They are in the same file.

Thanks,

Tom
Here is my DLL, where I have 3 classes defined outside of my Web Class:
AuthHeader, ServiceTicket and TempClass1
************************************************** ************************
<%@ WebService Class="SecureService" debug="True"%>

Imports System
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data
Imports System.Data.SqlClient

<WebService( Namespace:="http://10.0.0.25/webservices" )> _
Public Class SecureService : Inherits WebService

Public AuthenticationHeader As AuthHeader

<WebMethod()> Public Function Login( username As String, password As
String ) As ServiceTicket

End Function

End Class

Public Class AuthHeader:Inherits SoapHeader
Public SessionKey As String
End Class

Public Class ServiceTicket:Inherits AuthHeader
Public IsAuthenticated As Boolean
Public SessionKey As String
Public Expiration As DateTime
End Class

Public Class TempClass1:Inherits ServiceTicket
Public TomsClass1Name As String
End Class
************************************************** **********************

My Web page is :
************************************************** *******************
<%@ Import Namespace="Services" %>

<Script runat="Server">

Sub Page_Load
Dim objSecureService As SecureService
Dim objServiceTicket As ServiceTicket
Dim objAuthHeader As AuthHeader
Dim objTempClass1 As TempClass1

objSecureService = New SecureService
objServiceTicket = Session( "ServiceTicket" )
objTempClass1 = new TempClass1

</Script>

<html>
<head><title>TestSecureService.aspx</title></head>
<body>

<asp:Label
id="lblLuckyNumber"
EnableViewState="False"
Runat="Server" />

</body>
</html>
************************************************** ********************

Why do I only get an error on TempClass1 and not on the others?

2) In my Web page I have:

<%@ Import Namespace="Services" %>

But I don't have Namespace Services. Is this an MS Namespace?

Thanks,

Tom

Apr 3 '06 #2

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

Similar topics

8
by: Scott J. McCaughrin | last post by:
The following program compiles fine but elicits this message from the linker: "undefined reference to VarArray::funct" and thus fails. It seems to behave as if the static data-member:...
4
by: Chris Beall | last post by:
If you want your code to be bulletproof, do you have to explicitly check for the existence of any possibly-undefined variable? Example: window.outerHeight is defined by some browsers, but not...
19
by: E. Robert Tisdale | last post by:
In the context of the comp.lang.c newsgroup, the term "undefined behavior" actually refers to behavior not defined by the ANSI/ISO C 9 standard. Specifically, it is *not* true that "anything can...
30
by: jimjim | last post by:
Hello, #include <stdio.h> int main(int argc, char *argv) { int x = 1; printf("%d %d %d\n", ++x, x, x++); return 0; }
49
by: matty | last post by:
Hi, I recently got very confused (well that's my life) about the "undefined" value. I looked in the FAQ and didn't see anything about it. On...
33
by: dragoncoder | last post by:
Hi all, Does the following code invoke undefined behaviour ? $ cat a1.cc #include <iostream> #include <limits> int main() { int a = INT_MAX/2;
9
by: Klaus Johannes Rusch | last post by:
IE7 returns "unknown" instead of "undefined" when querying the type of an unknown property of an object, for example document.write(typeof window.missingproperty); Has "unknown" been defined...
45
by: VK | last post by:
(see the post by ASM in the original thread; can be seen at <http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/3716384d8bfa1b0b> as an option) As that is not in relevance to...
13
by: 7stud | last post by:
test1.py: -------------------- import shelve s = shelve.open("/Users/me/2testing/dir1/aaa.txt") s = "red" s.close() --------output:------ $ python test1.py
12
by: Franz Hose | last post by:
the following program, when compiled with gcc and '-std=c99', gcc says test.c:6: error: jump into scope of identifier with variably modified type that is, it does not even compile. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...

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.