Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Template Cast Error

  1. #1
    Blush.no is offline Junior Member
    Join Date
    Nov 2009
    Posts
    7

    Default Template Cast Error

    Hello.

    I've created a very simple page that should use our standard template. The page worked fine for å long while. I then uploaded the same file again to the server (the only difference between the old and new files are the file datetime). The new file get the following error:
    --
    Unable to cast object of type 'ASP.skins_skin_1_template_ascx' to type 'AspDotNetStorefront.TemplateBase'.

    [InvalidCastException: Unable to cast object of type 'ASP.skins_skin_1_template_ascx' to type 'AspDotNetStorefront.TemplateBase'.]
    AspDotNetStorefront.SkinBase.LoadSkinTemplate() +1630
    AspDotNetStorefront.SkinBase.OnPreInit(EventArgs e) +1703
    System.Web.UI.Page.PerformPreInit() +31
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282
    --

    I then tried to do the same again with another page: Downloaded it, did no code change and then uploaded it again. It got the same error. What is this? There have been no other code change in the solution right before these problems occured, and the files works fine in test.

    The URL is https://www.blush.no/paskekonk.aspx and the files can be seen below.

    Files:
    --
    paskekonk.aspx.cs:
    using System;
    using System.Text.RegularExpressions;
    using System.Text;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Data;
    using System.Globalization;
    using AspDotNetStorefrontCore;
    using AspDotNetStorefrontGateways;
    using System.Data.Sql;
    using System.Data.SqlClient;

    namespace AspDotNetStorefront
    {
    public partial class paskekonk : SkinBase
    {
    protected void Page_Load(object sender, EventArgs e)
    { }
    }
    }

    --

    paskekonk.aspx:
    <%@ Page ClientTarget="UpLevel" language="c#" Inherits="AspDotNetStorefront.paskekonk" CodeFile="paskekonk.aspx.cs" %>
    <%@ Register TagPrefix="aspdnsf" TagName="Topic" src="TopicControl.ascx" %>

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
    <title></title>
    </head>
    <body>

    test

    </body>
    </html>

  2. #2
    Blush.no is offline Junior Member
    Join Date
    Nov 2009
    Posts
    7

    Default

    We're using version 8.0.1.2.

  3. #3
    Matai is offline Junior Member
    Join Date
    Dec 2011
    Posts
    1

    Default

    You can enter a blank line in your master page, then delete it