I have a working website website project in visual studio. I can view all pages without a problem.
Now I copied 2 files from another Web Application Project I have: search.aspx search.aspx.vb
search.aspx source snippet
<%@ Page EnableViewState="true" EnableEventValidation="false" MetaDescription="<%$Resources:metadescription%>" Title="<%$Resources:pagetitle %>" Language="VB" MasterPageFile="~/main.master" AutoEventWireup="false" Inherits="search" Codebehind="search.aspx.vb" %>
<%@ MasterType VirtualPath="~/main.master" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
search.aspx.vb source snippet
Imports System
Imports System.Net
Imports System.IO
Imports GlobalFunctions
Imports System.Xml
Imports System.Collections.Generic
Imports System.Collections
Imports System.Linq
Imports System.Resources
Imports generalMethods
Imports System.Globalization
Partial Class search
Inherits System.Web.UI.Page
But when I try to request the page: www.test.com/search.aspx I get this error: Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'search'.
Source Error:
Line 1: <%@ Page EnableViewState="true" EnableEventValidation="false" MetaDescription="<%$Resources:metadescription%>" Title="<%$Resources:pagetitle %>" Language="VB" MasterPageFile="~/main.master" AutoEventWireup="false" Inherits="search" Codebehind="search.aspx.vb" %>
Line 2:
Line 3: <%@ MasterType VirtualPath="~/main.master" %>
Source File: /search.aspx Line: 1
When I tried building the project, I already see the error: Could not load type 'search'.
I have no idea anymore where to look for this.
Turns out I had to change "CodeBehind" to "CodeFile" in search.aspx...now it all works again.
This can also occur if the WAP's DLL in the bin directory on the webserver is outdated and therefore does not contain a precompiled code behind for the requested page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With