2011-08-30 63 views
1

我有一个mod_mono连接到传统ASP.NET应用程序的Apache服务器。我似乎无法让这个应用程序工作,如果我从顶级文件夹中移动它。Mono - 域名子文件夹中的ASP.NET应用程序

例如,下面的单.webapp成功地工作在http://localhost/Service.asmx(如我的web应用程序是在folder2):

<apps> 
<web-application> 
       <name>Test</name> 
       <vpath>/</vpath> 
       <path>/srv/aspnettest/folder1/folder2</path> 
       <vhost>localhost</vhost> 
     </web-application> 
</apps> 

然而,由于传统的URL,我需要我的web应用程序存在两个子文件夹更深像这样:

<apps> 
<web-application> 
       <name>Test</name> 
       <vpath>/</vpath> 
       <path>/srv/aspnettest/</path> 
       <vhost>localhost</vhost> 
     </web-application> 
</apps> 

如果我试图去http://localhost/folder1/folder2/Service.asmx它失败

HTTP 500. Error processing request. 

Stack Trace: 

System.Web.HttpException: Type MyType.Service not found. 
    at System.Web.UI.SimpleWebHandlerParser.GetTypeFromBin (System.String tname) [0x00000] in <filename unknown>:0 
    at System.Web.Compilation.SimpleBuildProvider.LoadTypeFromBin (System.Web.Compilation.BaseCompiler compiler, System.Web.UI.SimpleWebHandlerParser parser) [0x00000] in <filename unknown>:0 
    at System.Web.Compilation.GenericBuildProvider`1[TParser].GetGeneratedType (System.CodeDom.Compiler.CompilerResults results) [0x00000] in <filename unknown>:0 
    at System.Web.Compilation.BuildManagerCacheItem..ctor (System.Reflection.Assembly assembly, System.Web.Compilation.BuildProvider bp, System.CodeDom.Compiler.CompilerResults results) [0x00000] in <filename unknown>:0 
    at System.Web.Compilation.BuildManager.StoreInCache (System.Web.Compilation.BuildProvider bp, System.Reflection.Assembly compiledAssembly, System.CodeDom.Compiler.CompilerResults results) [0x00000] in <filename unknown>:0 
    at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0 
    at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0 
    at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp) [0x00000] in <filename unknown>:0 
    at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0 
    at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) [0x00000] in <filename unknown>:0 
    at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler (System.Web.HttpContext context, System.String verb, System.String url, System.String filePath) [0x00000] in <filename unknown>:0 
    at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url, Boolean ignoreContextHandler) [0x00000] in <filename unknown>:0 
    at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url) [0x00000] in <filename unknown>:0 
    at System.Web.HttpApplication+<Pipeline>c__Iterator2.MoveNext() [0x00000] in <filename unknown>:0 

如何在子文件夹中成功获取Web应用程序?谢谢。

回答

0

原来,这是一个与配置无关的Apache配置问题,但这是一个副作用。我的VirtualHost设置不正确。

相关问题