Hi Juraj,
Please see below my .cs code .
region "Namespaces"
using System;
using CMS.PortalEngine.Web.UI;
endregion
public partial class CMSWebParts_Campaigns_Check_User : CMSAbstractWebPart
{
#region Page Load
protected void Page_Load(object sender, EventArgs e)
{
if (BookSellerSession.Current.GLN != null)
Response.Redirect("~/Account/Special-Pages/Checkout/Shopping-Cart");
else
Response.Redirect("~/Special-Pages/Checkout/Shopping-Cart");
}
#endregion
}
This is all I got in my .ascx file
<%@ Control Language="C#" AutoEventWireup="true" Inherits="CMSWebParts_Campaigns_Check_User" CodeBehind="~/CMSWebParts/Campaigns/Check_User.ascx.cs" %>
Please see below my Event log.
EventID: 60228
EventType: E
EventTime: 5/29/2020 9:46:47 AM
Source: PortalEngine
EventCode: LoadWebPart
UserID: 53
UserName: administrator
IPAddress: 192.168.113.5
EventDescription: Message: Could not load type 'CMSWebParts_Campaigns_Check_User'.
Exception type: System.Web.HttpParseException
Stack trace:
at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath)
at System.Web.UI.TemplateParser.ParseInternal()
at System.Web.UI.TemplateParser.Parse()
at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()
at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)
at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath)
at CMS.Base.Web.UI.ControlDefinition.Load(Page page)
at CMS.PortalEngine.Web.UI.CMSWebPartZone.LoadWebPart(Control container, CMSWebPartZone zone, WebPartInstance part, Boolean reloadData, Boolean isVariant)
Message: Could not load type 'CMSWebParts_Campaigns_Check_User'.
Exception type: System.Web.HttpParseException
Stack trace:
at System.Web.UI.TemplateParser.ProcessException(Exception ex)
at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
Message: Could not load type 'CMSWebParts_Campaigns_Check_User'.
Exception type: System.Web.HttpException
Stack trace:
at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError)
at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly)
at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData)
EventUrl: /special-pages/check-user
EventMachineName: DC16C132
EventUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
EventUrlReferrer: http://172.16.20.195/account/products
Any help would be appreciated.
Thank you.
Regards,
JJ