.NETGURU
Quickstart Tutorial - Need Help Please with Type Expected Error
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngvb' list.


Larry Smith
I have been trying to compile the quickstart tutorial for the
Personalized Portal, and can't seem to get it to compile. Here is the
problem:

1)I have the Personalization.VB Class compiled and referenced in the
Project.

2)I then have the PortalModulePage.VB class in the the project:

PortalModulePage.VB:

Imports System
Imports System.Web.UI.Page
Imports System.Web
Imports System.Collections
Imports System.Web.UI
Imports System.Web.UI.HtmlControls
Imports Personalization

Public Class PortalModulePage : Inherits Page

3) I then reference the PortalModulePage in the Default.VB class:

Imports System
Imports System.Web
Imports System.Collections
Imports System.Web.UI
Imports System.Web.UI.HtmlControls
Imports System.Web.UI.WebControls

Public Class DefaultPage : Inherits PortalModulePage

4) This all looks great as far as the project compiling correctly.
However, when I attempt to run the application from the web server (same
machine) I get:

Compilation Error

Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific
error details and modify your source code appropriately.

Compiler Error Message: BC30182: Type expected.

Source Error:

    

Line 9: 'Imports Microsoft.VisualBasic

Line 10:

Line 11: Public Class DefaultPage : Inherits PortalModulePage

Line 12: Public anchorDelete As HtmlAnchor

Line 13: Public anchorCustomize As HtmlAnchor

Source File: c:\inetpub\wwwroot\portal\Default.vb Line: 11

C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.0.3705\vbc.exe"
/t:library /utf8output
/R:"c:\winnt\assembly\gac\system.data\1.0.3300.0__b77a5c561934e089\syste
m.data.dll"
/R:"c:\winnt\assembly\gac\system.web.services\1.0.3300.0__b03f5f7f11d50a
3a\system.web.services.dll"
/R:"c:\inetpub\wwwroot\portal\bin\personalization.dll"
/R:"c:\winnt\assembly\gac\system.enterpriseservices\1.0.3300.0__b03f5f7f
11d50a3a\system.enterpriseservices.dll"
/R:"c:\inetpub\wwwroot\portal\bin\portal.dll"
/R:"c:\inetpub\wwwroot\portal\bin\login.dll"
/R:"c:\winnt\assembly\gac\system.drawing\1.0.3300.0__b03f5f7f11d50a3a\sy
stem.drawing.dll"
/R:"c:\inetpub\wwwroot\portal\bin\portalmodulecontrol.dll"
/R:"c:\winnt\assembly\gac\system.xml\1.0.3300.0__b77a5c561934e089\system
.xml.dll" /R:"c:\inetpub\wwwroot\portal\bin\portalmodulepage.dll"
/R:"c:\winnt\assembly\gac\system.web\1.0.3300.0__b03f5f7f11d50a3a\system
.web.dll"
/R:"c:\winnt\assembly\gac\system\1.0.3300.0__b77a5c561934e089\system.dll
" /out:"C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET
Files\portal\ba7ddf57\6855be9b\5ntb1dbk.dll" /D:DEBUG=1 /debug+
"c:\inetpub\wwwroot\portal\Default.vb"

Microsoft (R) Visual Basic .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.00.3705.209
Copyright (C) Microsoft Corporation 1987-2001. All rights reserved.

c:\inetpub\wwwroot\portal\Default.vb(11) : error BC30182: Type expected.

Public Class DefaultPage : Inherits PortalModulePage
~~~~~~~~~~~~~~~~
c:\inetpub\wwwroot\portal\Default.vb(29) : error BC30451: Name 'Request'
is not declared.

If (Request.QueryString.Item("_PageIndex") <> "") Then
~~~~~~~
c:\inetpub\wwwroot\portal\Default.vb(30) : error BC30451: Name 'Request'
is not declared.

SetPageIndex(Request.QueryString.Item("_PageIndex"))
~~~~~~~
c:\inetpub\wwwroot\portal\Default.vb(31) : error BC30451: Name 'Request'
is not declared.

PageIndex = Int32.Parse(Request.QueryString("_PageIndex"))
~~~~~~~
c:\inetpub\wwwroot\portal\Default.vb(32) : error BC30451: Name 'Request'
is not declared.

ElseIf (Not Request.Cookies("_PageIndex") Is Nothing) Then
~~~~~~~
c:\inetpub\wwwroot\portal\Default.vb(33) : error BC30451: Name 'Request'
is not declared.

PageIndex = Int32.Parse(Request.Cookies("_PageIndex").Value)
~~~~~~~
c:\inetpub\wwwroot\portal\Default.vb(54) : error BC30451: Name
'UserState' is not declared.

BuildModuleList(LeftUIModules, UserState("PageModules_" +
PageIndex.ToString() + "L"))
~~~~~~~~~

4) As you can see, it's as if the referencing between the classes gets
broken along the way. Does anyone have any experience with this tutorial
or have any suggestions on what could be wrong?

Thanks in advance!

Larry
Reply to this message...
 
    
Duncan Mackenzie
I have been trying to compile the quickstart tutorial for the
Personalized Portal, and can't seem to get it to compile. Here is the
problem:
=20
1)I have the Personalization.VB Class compiled and referenced in the
Project.
=20
2)I then have the PortalModulePage.VB class in the the project:
=20
PortalModulePage.VB:
=20
Imports System
Imports System.Web.UI.Page
Imports System.Web
Imports System.Collections
Imports System.Web.UI
Imports System.Web.UI.HtmlControls
Imports Personalization
=20
Public Class PortalModulePage : Inherits Page
=20
3) I then reference the PortalModulePage in the Default.VB class:
=20
=20
Imports System
Imports System.Web
Imports System.Collections
Imports System.Web.UI
Imports System.Web.UI.HtmlControls
Imports System.Web.UI.WebControls
=20
Public Class DefaultPage : Inherits PortalModulePage
=20
4) This all looks great as far as the project compiling correctly.
However, when I attempt to run the application from the web server (same
machine) I get:
=20

Compilation Error=20

Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific
error details and modify your source code appropriately.=20

Compiler Error Message: BC30182: Type expected.

Source Error:

=09

Line 9: 'Imports Microsoft.VisualBasic

Line 10:=20

Line 11: Public Class DefaultPage : Inherits PortalModulePage

Line 12: Public anchorDelete As HtmlAnchor

Line 13: Public anchorCustomize As HtmlAnchor

Source File: c:\inetpub\wwwroot\portal\Default.vb Line: 11=20

C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.0.3705\vbc.exe"
/t:library /utf8output
/R:"c:\winnt\assembly\gac\system.data\1.0.3300.0__b77a5c561934e089\syste
m.data.dll"
/R:"c:\winnt\assembly\gac\system.web.services\1.0.3300.0__b03f5f7f11d50a
3a\system.web.services.dll"
/R:"c:\inetpub\wwwroot\portal\bin\personalization.dll"
/R:"c:\winnt\assembly\gac\system.enterpriseservices\1.0.3300.0__b03f5f7f
11d50a3a\system.enterpriseservices.dll"
/R:"c:\inetpub\wwwroot\portal\bin\portal.dll"
/R:"c:\inetpub\wwwroot\portal\bin\login.dll"
/R:"c:\winnt\assembly\gac\system.drawing\1.0.3300.0__b03f5f7f11d50a3a\sy
stem.drawing.dll"
/R:"c:\inetpub\wwwroot\portal\bin\portalmodulecontrol.dll"
/R:"c:\winnt\assembly\gac\system.xml\1.0.3300.0__b77a5c561934e089\system
.xml.dll" /R:"c:\inetpub\wwwroot\portal\bin\portalmodulepage.dll"
/R:"c:\winnt\assembly\gac\system.web\1.0.3300.0__b03f5f7f11d50a3a\system
.web.dll"
/R:"c:\winnt\assembly\gac\system\1.0.3300.0__b77a5c561934e089\system.dll
" /out:"C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET
Files\portal\ba7ddf57\6855be9b\5ntb1dbk.dll" /D:DEBUG=3D1 /debug+
"c:\inetpub\wwwroot\portal\Default.vb"

Microsoft (R) Visual Basic .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.00.3705.209 Copyright (C)
Microsoft Corporation 1987-2001. All rights reserved.

c:\inetpub\wwwroot\portal\Default.vb(11) : error BC30182: Type expected.

Public Class DefaultPage : Inherits PortalModulePage
~~~~~~~~~~~~~~~~
c:\inetpub\wwwroot\portal\Default.vb(29) : error BC30451: Name 'Request'
is not declared.

If (Request.QueryString.Item("_PageIndex") <> "") Then
~~~~~~~ =20
c:\inetpub\wwwroot\portal\Default.vb(30) : error BC30451: Name 'Request'
is not declared.

SetPageIndex(Request.QueryString.Item("_PageIndex"))
~~~~~~~ =20
c:\inetpub\wwwroot\portal\Default.vb(31) : error BC30451: Name 'Request'
is not declared.

PageIndex =3D Int32.Parse(Request.QueryString("_PageIndex"))
~~~~~~~ =20
c:\inetpub\wwwroot\portal\Default.vb(32) : error BC30451: Name 'Request'
is not declared.

ElseIf (Not Request.Cookies("_PageIndex") Is Nothing) Then
~~~~~~~ =20
c:\inetpub\wwwroot\portal\Default.vb(33) : error BC30451: Name 'Request'
is not declared.

PageIndex =3D Int32.Parse(Request.Cookies("_PageIndex").Value)
~~~~~~~ =20
c:\inetpub\wwwroot\portal\Default.vb(54) : error BC30451: Name
'UserState' is not declared.

BuildModuleList(LeftUIModules, UserState("PageModules_" +
PageIndex.ToString() + "L"))
~~~~~~~~~

=20
4) As you can see, it's as if the referencing between the classes gets
broken along the way. Does anyone have any experience with this tutorial
or have any suggestions on what could be wrong?
=20
Thanks in advance!
=20
Larry
Reply to this message...
 
 
System.Int32
System.Web.UI.HtmlControls.HtmlAnchor
System.Web.UI.Page




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification