0
I have a project where it works. I needed to create another project in another place and I took advantage of what I already have. It turns out you’re making a mistake on the basis.Initialize(...) saying you don’t recognize this guy. I put the same using of the other project, ie Ctrl+c and Ctrl+v and nothing else. Below my methods
protected override void Initialize(System.Web.Routing.RequestContext requestContext)
{
requestContext.HttpContext.Response.Buffer = true;
requestContext.HttpContext.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
requestContext.HttpContext.Response.Expires = 0;
requestContext.HttpContext.Response.CacheControl = "no-cache";
requestContext.HttpContext.Response.Cache.SetCacheability(HttpCacheability.NoCache);
string strPaginaAtual = requestContext.HttpContext.Request.CurrentExecutionFilePath;
strPaginaAtual = strPaginaAtual.Remove(0, strPaginaAtual.LastIndexOf("/") + 1);
base.Initialize(requestContext);
}
protected override void OnException(ExceptionContext filterContext)
{
base.OnException(filterContext);
}
and my usings:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using System.Web.Security;
I went to compile and made that mistake:
Error 1 'V99Util.WebPageBase.Initialize(System.Web.Routing.RequestContext)': no suitable method found to override
What is the base class of the class
WebPageBase
?– carlosfigueira
@pnet, the place to publish the problem solution is in an Answer and not within the Question. Apparently, it’s the same solution that Gypsy posted, maybe mark his answer as correct?
– brasofilo