Cannot browse to a new custom aspx page

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
rich
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Thu Jun 25, 2015 9:46 am

Cannot browse to a new custom aspx page

Post by rich » Thu Jun 25, 2015 11:05 am

We are on Able Gold (7.09) latest release brand new installation.

We created a new theme copied fomr the Bootstrap Responsive theme per the directions and set that as the default theme. Home page displays fine with our new theme changes after getting all the Less things added.

I needed to create a new custom aspx page to capture some information into a new DB table. When i try to browse to that page to test my code, canned cant'find that page error = page not found although the file is there in the root folder of the site. I checked spelling and all that. Cleared cache etc. The page is basically mirroring

Actual response is: We are sorry, but the page you are trying to access has experienced an error.

I then tried to create a static html page in that same folder and do not get an error and displayed the test text.

i then tried to browse to one of the out of the box pages that came with able Gold Webpage.aspx directly and I get the same error page not found.

i tried adding a new page via admin and i can then browse to that page even though no physical page exists which tells me when adding via admin they are stored in a DB table somewhere. That is fine for plain pages but i need to add custom code behind code in an aspx.cs file.

Here is the aspx code stripped out to basic html and get the error: Just using standard bootstrap containers.

<%@ Page Title="" Language="C#" MasterPageFile="~/Layouts/Fixed/LeftSidebar.Master" AutoEventWireup="true" CodeBehind="ApplyForMembership.aspx.cs" Inherits="AbleCommerce.Members.ApplyForMembership" %>

<asp:Content ID="PageContent" runat="server" ContentPlaceHolderID="PageContent">
<div id="membership" class="mainContentWrapper">
<div class="section">
<div class="pageHeader">
<h1>Apply For Membership</h1>
</div>
</div>
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading">Panel Heading 1</div>
<div class="panel-body">Panel Content 1</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Panel Heading 2</div>
<div class="panel-body">Panel Content 2</div>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="LeftSidebar" runat="server">
</asp:Content>

So my question is how do we add a new physical aspx page to the site if we are adding some custom code outside of Able or adding to Able just using our own pages?
Is there any developer guide/tutorial for creating our own pages available? i only saw the api and overriding stuff on the help pages.

Thanks in advance for your guidance.
Rich

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Cannot browse to a new custom aspx page

Post by mazhar » Fri Jun 26, 2015 12:09 am

First of all you should turn of the custom errors to see more details about error. For this edit your web.config file and locate following line

Code: Select all

<customErrors mode="On" defaultRedirect="~/Errors/GeneralError.aspx">
and update it like

Code: Select all

<customErrors mode="Off" defaultRedirect="~/Errors/GeneralError.aspx">
Now try to browse the page again and it will show error details. If you are using AbleCommerce Web Application build then you would need to build your website project in Visual Studio after adding new page. In order to make your new page follow AbleCommerce themes you will have to extend your new page class code from CommerceBuilder.UI.AbleCommercePage.

rich
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Thu Jun 25, 2015 9:46 am

Re: Cannot browse to a new custom aspx page

Post by rich » Fri Jun 26, 2015 2:56 am

Here is the error i am getting and the page will not render. Just have basic HTMl in there so far so not sure what is going wrong. Thanks for your help.
Also getting these two build errors when trying to go to internet from VS2013 Express
Error 2 Unknown server tag 'uc:CheckoutProgress'. W:\Clients\domainName\Website\Layouts\Fixed\Checkout.master 60

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: 'AbleCommerce.Members.ApplyForMembership' is not allowed here because it does not extend class 'System.Web.UI.Page'.

Source Error:

Line 1: <%@ Page Title="" Language="C#" MasterPageFile="~/Layouts/Fixed/LeftSidebar.Master" AutoEventWireup="true" CodeBehind="ApplyForMembership.aspx.cs" Inherits="AbleCommerce.Members.ApplyForMembership" %>
Line 2:
Line 3: <asp:Content ID="PageContent" runat="server" ContentPlaceHolderID="PageContent">

Source File: /ApplyForMembership.aspx Line: 1


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34249

Here is the code behind. Doing nothing yet but added the page reference sent previoulsy.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AbleCommerce.Code;
using CommerceBuilder.Utility;
using CommerceBuilder.Configuration;
using CommerceBuilder.DomainModel;

public partial class ApplyForMembership : CommerceBuilder.UI.AbleCommercePage
{
protected void Page_Load(object sender, EventArgs e)
{

}
}

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Cannot browse to a new custom aspx page

Post by mazhar » Sun Jun 28, 2015 11:22 pm

Looks like you are using Web Application Build. In WAP project you need to build the website after adding new webpage. Please make sure you do build the website project in Visual Studio to compile new code changes.

Post Reply