I am routing all request myself, which get me into the problem of WebResource.axd requests, the solution I thought of is to modify the dot net framework code of AssemblyResourceLoader class, as CustomAssemblyResourceLoader, and set it to handle WebResource.axd requests. I am using Lutz Roeders Dot Net reflector to access the framework code.
The first step is to compile the code, I am implementing CustomAssemblyResourceLoader as follows (please note that whole AssemblyResourceLoader is copy-paste in CustomAssemblyResourceLoader just for now):
namespace System.Web.Handlers
{
public sealed class CustomAssemblyResourceLoader : IHttpHandler
{
...
private static VirtualPath _smartNavPageLocation;
...
I have added all the required references and namespaces, but I am still getting compilation error:
‘System.Web.VirtualPath’ is
inaccessible due to its protection
level
If VirtualPath is inaccessible to CustomAssemblyResourceLoader, then how is it accessible to AssemblyResourceLoader. What would be solution to this problem?
Thank you.
Because VirtualPath is marked internal. Only code inside System.Web.dll can use it. That has to be bad news, there’s no decent workaround for this.