ASP.NET CodeBehind error "Could not load type" when adding a new folder and default.aspx

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Guys, I'm a pro ASP.NET developer, been doing this for a decade, but this issue has me stumped and feeling like I'm back to only a few months experience, very humbling. This is more of an ASP.NET issue than a nopCommerce issue but it's happening in nopCommerce.

I'm running nopCommerce 1.9 on local IIS 7.5 (Windows 7 x64) and with ASP.NET 4.0 set up for the app pool in 32-bit mode (enabled across all app pools). Everything runs fine at this point. I added a new directory to the NopCommerceStore project called "Testing" and added Default.aspx (whereby VS2010 added Default.aspx.cs and Default.aspx.designer.cs). I put some junk text into the <div>, cleaned the solution, rebuilt, launched, and ...

I got a YSOD:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser 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 'NopSolutions.NopCommerce.Web.Testing._default'.

Source Error:

Line 1:  <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="NopSolutions.NopCommerce.Web.Testing._default" %>
Line 2:  
Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Source File: /Testing/default.aspx    Line: 1

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1


What the heck man?

I changed the base class to BaseNopFrontendPage, no change. I changed CodeBehind to CodeFile in the .aspx header, and it worked. But looking at other nopCommerce ASPX files they're all using CodeBehind. I also lose the designer generated properties associated with added web controls.

Why would CodeBehind not work? I didn't do anything weird when i added this; the default.aspx.cs file is configured to compile, and I did clean my solution and rebuild before launching. What's the deal with this??
13 years ago
Resolved. I had to revert to AnyCPU. I had to use x86 because a component (I think it was the Excel import utility which uses MDAC?) requries x86. Opening a different thread about that.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.