Skip to content

OpenRasta.Codecs.WebForms.ResourceView does not accept full type name as the generic argument in the resource view aspx file. #1

@MarkKharitonov

Description

@MarkKharitonov

I am using openwrap to get openrasta. According to openwrap my dependencies are up-to-date:

C:\Work\Rest\MyRestApplication>o update-wrap
# OpenWrap Shell 1.1.0.35
# Copyright © naughtyProd Limited 2009-2011
# Using C:\Work\Rest\MyRestApplication\wraps\_cache\openwrap-1.0.0.63365789\bin-net35\OpenWrap.dll (1.0.0.0)

Project repository: openwrap up-to-date.
Project repository: SharpZipLib up-to-date.
Project repository: openfilesystem up-to-date.
Project repository: tdnet-framework up-to-date.
Project repository: openrasta-full up-to-date.
Project repository: openrasta-core up-to-date.
Project repository: NUnit up-to-date.
Project repository: Moq up-to-date.
Project repository: openrasta-sharpview up-to-date.
Project repository: openrasta-aspnet up-to-date.

I am following the guide here - https://github.com/openrasta/openrasta-stable/wiki/Building-Your-First-OpenRasta-Website

When my HomeView.aspx file looks like this:

<%@ Page Language="C#" AutoEventWireup="true" Inherits="OpenRasta.Codecs.WebForms.ResourceView<Home>" %>

The sample works correctly. However, if I try to use the full type name instead of Home, like this:

<%@ Page Language="C#" AutoEventWireup="true" Inherits="OpenRasta.Codecs.WebForms.ResourceView<MyRestApplication.Resources.Home>" %>

Then there is an exception:

System.ArgumentNullException occurred
  Message=Value cannot be null.
  Source=mscorlib
  StackTrace:
       at System.RuntimeType.MakeGenericType(Type[] instantiation)
  InnerException: 

The full stack trace is:

mscorlib.dll!System.RuntimeType.MakeGenericType(System.Type[] instantiation) + 0x203 bytes  
OpenRasta.Codecs.WebForms.DLL!OpenRasta.Codecs.WebForms.OpenRastaPageParserFilter.TypeDef.BuildType() Line 274 + 0x24 bytes C#
OpenRasta.Codecs.WebForms.DLL!OpenRasta.Codecs.WebForms.OpenRastaPageParserFilter.TypeBuilder.Parse(string typeName) Line 245 + 0x1d bytes  C#
OpenRasta.Codecs.WebForms.DLL!OpenRasta.Codecs.WebForms.OpenRastaPageParserFilter.GetTypeFromCSharpType(string typeName, System.Collections.Generic.IEnumerable<string> namespaces) Line 59 + 0x2f bytes    C#
OpenRasta.Codecs.WebForms.DLL!OpenRasta.Codecs.WebForms.OpenRastaPageParserFilter.ParseInheritsAttribute(string originalAttribute) Line 106 + 0x47 bytes    C#
OpenRasta.Codecs.WebForms.DLL!OpenRasta.Codecs.WebForms.OpenRastaPageParserFilter.PreprocessDirective(string directiveName, System.Collections.IDictionary attributes) Line 130 + 0x77 bytes    C#
System.Web.dll!System.Web.UI.TemplateParser.PreprocessDirective(string directiveName, System.Collections.IDictionary directive) + 0x35 bytes    
System.Web.dll!System.Web.UI.TemplateParser.ParseStringInternal(string text, System.Text.Encoding fileEncoding) + 0x3a6 bytes   
System.Web.dll!System.Web.UI.TemplateParser.ParseString(string text, System.Web.VirtualPath virtualPath, System.Text.Encoding fileEncoding) + 0x6f bytes    
System.Web.dll!System.Web.UI.TemplateParser.ParseFile(string physicalPath, System.Web.VirtualPath virtualPath) + 0x115 bytes    
System.Web.dll!System.Web.UI.TemplateParser.ParseInternal() + 0x57 bytes    
System.Web.dll!System.Web.UI.TemplateParser.Parse() + 0x64 bytes    
System.Web.dll!System.Web.Compilation.BaseTemplateBuildProvider.CodeCompilerType.get() + 0x6f bytes 
System.Web.dll!System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(System.Web.Compilation.BuildProvider buildProvider) + 0x42 bytes   
System.Web.dll!System.Web.Compilation.WebDirectoryBatchCompiler.CompileNonDependentBuildProviders(System.Collections.ICollection buildProviders) + 0xca bytes   
System.Web.dll!System.Web.Compilation.WebDirectoryBatchCompiler.Process() + 0x5d bytes  
System.Web.dll!System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(System.Web.Hosting.VirtualDirectory vdir, bool ignoreErrors) + 0x48 bytes   
System.Web.dll!System.Web.Compilation.BuildManager.BatchCompileWebDirectory(System.Web.Hosting.VirtualDirectory vdir, System.Web.VirtualPath virtualDir, bool ignoreErrors) + 0xbc bytes    
System.Web.dll!System.Web.Compilation.BuildManager.CompileWebFile(System.Web.VirtualPath virtualPath) + 0x5d bytes  
System.Web.dll!System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(System.Web.VirtualPath virtualPath, bool noBuild, bool allowCrossApp, bool allowBuildInPrecompile, bool throwIfNotFound, bool ensureIsUpToDate) + 0x141 bytes    
System.Web.dll!System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(System.Web.HttpContext context, System.Web.VirtualPath virtualPath, bool noBuild, bool allowCrossApp, bool allowBuildInPrecompile, bool throwIfNotFound, bool ensureIsUpToDate) + 0x70 bytes 
System.Web.dll!System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(System.Web.VirtualPath virtualPath, System.Web.HttpContext context, bool allowCrossApp, bool throwIfNotFound) + 0x7e bytes   
System.Web.dll!System.Web.Compilation.BuildManager.GetCompiledType(System.Web.VirtualPath virtualPath) + 0xb bytes  
System.Web.dll!System.Web.Compilation.BuildManager.GetCompiledType(string virtualPath) + 0x1d bytes 
OpenRasta.Codecs.WebForms.DLL!OpenRasta.Codecs.WebForms.WebFormsCodec.WriteTo(object entity, OpenRasta.Web.IHttpEntity response, string[] codecParameters) Line 107 + 0x8 bytes C#
OpenRasta.DLL!OpenRasta.Pipeline.Contributors.ResponseEntityWriterContributor.WriteResponse(OpenRasta.Web.ICommunicationContext context) Line 75    C#
OpenRasta.DLL!OpenRasta.Pipeline.PipelineRunner.ExecuteContributor(OpenRasta.Web.ICommunicationContext context, OpenRasta.Pipeline.ContributorCall call) Line 192 + 0x1b bytes  C#
OpenRasta.DLL!OpenRasta.Pipeline.PipelineRunner.RunCallGraph(OpenRasta.Web.ICommunicationContext context, OpenRasta.Pipeline.PipelineStage stage) Line 106 + 0x17 bytes C#
OpenRasta.DLL!OpenRasta.Pipeline.PipelineRunner.Run(OpenRasta.Web.ICommunicationContext context) Line 97    C#
OpenRasta.DLL!OpenRasta.Hosting.HostManager.HandleHostIncomingRequestReceived.AnonymousMethod__3() Line 196 + 0x2a bytes    C#
OpenRasta.DLL!OpenRasta.Hosting.HostManager.ThreadScopedAction(System.Action action) Line 162 + 0xb bytes   C#
OpenRasta.DLL!OpenRasta.Hosting.HostManager.HandleHostIncomingRequestReceived(object sender, OpenRasta.Hosting.IncomingRequestEventArgs e) Line 198 C#
OpenRasta.DLL!OpenRasta.EventHandlerExtensions.Raise<OpenRasta.Hosting.IncomingRequestReceivedEventArgs>(System.EventHandler<OpenRasta.Hosting.IncomingRequestReceivedEventArgs> handler, object src, OpenRasta.Hosting.IncomingRequestReceivedEventArgs args) Line 24  C#
OpenRasta.Hosting.AspNet.DLL!OpenRasta.Hosting.AspNet.AspNetHost.RaiseIncomingRequestReceived(OpenRasta.Web.ICommunicationContext context) Line 105 + 0x36 bytes    C#
OpenRasta.Hosting.AspNet.DLL!OpenRasta.Hosting.AspNet.OpenRastaIntegratedHandler.ProcessRequest(System.Web.HttpContext context) Line 86 + 0x1d bytes    C#
OpenRasta.Hosting.AspNet.DLL!OpenRasta.Hosting.AspNet.OpenRastaRewriterHandler.ProcessRequest(System.Web.HttpContext context) Line 64 + 0x2d bytes  C#
System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 0x65 bytes 
System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step, ref bool completedSynchronously) + 0x4c bytes 
System.Web.dll!System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(System.Exception error) + 0x13e bytes  
System.Web.dll!System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback cb, object extraData) + 0xad bytes  
System.Web.dll!System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest wr) + 0x1a2 bytes 
System.Web.dll!System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest wr) + 0x7d bytes  
System.Web.dll!System.Web.HttpRuntime.ProcessRequest(System.Web.HttpWorkerRequest wr) + 0x47 bytes  
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Request.Process() + 0x17b bytes 
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Microsoft.VisualStudio.WebHost.Connection conn) + 0x6c bytes    
[Appdomain Transition]  
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Server.OnSocketAccept(object acceptedSocket) + 0x83 bytes   
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) + 0x2d bytes 
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0xb0 bytes    
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() + 0x5a bytes 
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() + 0x147 bytes  
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() + 0x2d bytes    
[Native to Managed Transition]  

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions