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
Cannot browse to a new custom aspx page
Re: Cannot browse to a new custom aspx page
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
and update it like
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.
Code: Select all
<customErrors mode="On" defaultRedirect="~/Errors/GeneralError.aspx">
Code: Select all
<customErrors mode="Off" defaultRedirect="~/Errors/GeneralError.aspx">
Re: Cannot browse to a new custom aspx page
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)
{
}
}
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)
{
}
}
Re: Cannot browse to a new custom aspx page
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.