开发者

Mono - ASP.NET Application in domain Subfolder

I have an Apache server with mod_mono hooked up to a legacy ASP.NET application. I can't seem to get this application to work if I move it from a top level folder.

For example, the following mono .webapp successfully works at http://localhost/Service.asmx (as my web app is in folder2):

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

However, due to a legacy URL, I need my web application to exist two subfolders deeper like so:

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

If I try to go to http://localhost/folder1/folder2/Service.asmx it fails with

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.开发者_如何学JAVABuildManager.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 

How can I successfully get a web app in subfolders? Thanks.


Turns out this was an Apache configuration issue that was unrelated but caused this as a side effect. I had my VirtualHost setup incorrectly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜