Web Application in Virtual Directory

Discussion in 'ASP.NET / ASP.NET Core' started by kthsoftware, May 7, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I'm running Kentico CMS 5.0 at the root of the web site. I've created a sub directory and made it a Virtual Directory to run another web application which is not a Kentico CMS web application. I'm receiving the following error when running a page from the application in the virtual directory:

    Request is not available in this context
    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.

    Code:
    Exception Details: System.Web.HttpException: Request is not available in this context
    
    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: 
    
    
    [HttpException (0x80004005): Request is not available in this context]
       System.Web.HttpContext.get_Request() +8790880
       motivationTool.Global.Application_Start(Object sender, EventArgs e) +43
    
    [HttpException (0x80004005): Request is not available in this context]
       System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +2722546
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +128
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +188
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +295
       System.Web.HttpApplicationFactory.GetPipelineApplicationInstance(IntPtr appContext, HttpContext context) +56
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +231
    
    [HttpException (0x80004005): Request is not available in this context]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8894031
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333
    
     
    
    
    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016 
     
  2. Text of virtual directory Web.config

    Code:
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <system.web>
        <compilation defaultLanguage="c#" debug="true" />
        <customErrors mode="Off" /> 
        <authentication mode="Windows" /> 
        <authorization>
            <allow users="*" />
        </authorization>
        <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
        <sessionState  mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />
        <globalization requestEncoding="utf-8" responseEncoding="utf-8" />
     </system.web>
    </configuration>
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page