?
Solved

XML Data Access Error with ASP.NET & Visual Studio .NET

Posted on 2005-05-13
3
Medium Priority
?
209 Views
Last Modified: 2013-11-25
Hi, I'm having an issue with the following code:

Imports System.Xml
Imports System.Data



Public Class xmlread
    Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim reader As XmlTextReader

        Try
            reader = New XmlTextReader(Server.MapPath("books.xml"))
            While reader.Read()
                Response.Write("<b>" & reader.Name & "</b> " & reader.Value & "<br />")
            End While
        Catch ex As Exception
            Response.Write("Error accessing file")
        Finally
            reader.Close()
        End Try
    End Sub

End Class

Which is generating thie following error message:

Parser Error Message: Could not load type 'adolearn.xmlread'.

Source Error:


Line 1:  <%@ Page Language="vb" AutoEventWireup="false" Codebehind="xmlread.aspx.vb" Inherits="adolearn.xmlread"%>
Line 2:  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Line 3:  <HTML>
 
Does anyone have a clue on how to fix this?  I have a project set up in Visual Studio .NET called adolearn and the file generating the error is called xmlread.aspx.
0
Comment
Question by:Littlesey
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
riyasjef earned 375 total points
ID: 13994754
Hi
I think ur application has not been built.

RJ


0
 
LVL 9

Expert Comment

by:riyasjef
ID: 13994764
If u r using vs.net

Press Ctrl+shift+B

and execute the page..
0
 

Expert Comment

by:fromapu
ID: 13995091
Hi

What is the name of your project?
The inherits part  in the @ page should ideally contain
projectname.namespace.classname

if no namespace mentioned then
projectname.classname

This should be the cause of the problem.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question