Net 3.5 SP1 and attempting to implement a sample copy of http://haacked.com/archive/2008/03/11/using-routing-with-webforms.aspx into a sample web application however I seem to be having some issues.
I am running windows vista, IIS 7.0, integrated-mode.
Below is the YSOD:
Cannot create an abstract class.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.MissingMethodException: Cannot create an abstract class.
Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: [MissingMethodException: Cannot create an abstract class.] System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +86 System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +230 System.Activator.CreateInstance(Type type, Boolean nonPublic) +67 System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1051 System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111 System.Web.Configuration.HandlerFactoryCache..ctor(String type) +57 System.Web.HttpApplication.GetFactory(String type) +78 System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +229 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
I have an interface which looks like so:
public interface IRoutablePage : IHttpHandler
{
UrlHelper Url { get; }
HtmlHelper Html { get; }
RequestContext RequestContext { get; set;}
}
I have an abstract class (RoutablePage) which inherits this interface and System.Web.UI.Page.
I then have a web page (attached to a masterpage) which inherits the RoutablePage class.
I have routes setup in my web config and when I try and access http://local.url/pageName I experience the YSOD with the information above.
Can anyone help solve this issue please?
Cheers