[Mono-list] Web service cannot find assembly when placed to subfolder

Andrus Moor kobruleht2 at hot.ee
Fri Jun 5 13:38:00 EDT 2009


I have the following files hosted in apache + Mono 2.4 +  Debian :

~/www/htdocs/demo/StockService.asmx
~/www/htdocs/demo/Bin/Myapp.Service.dll

StockService.asmx contains:

<%@ WebService Language="C#" Debug="True" CodeBehind="MyApp.Service.dll"
Class="MyApp.Service.StockService" %>

Typing

http://mysite.com/demo/StockService.asmx

in browser

causes exception Type MyApp.Service.StockService not found below.

If those files are placed directly to htdocs folder, all is OK.
I need to host multiple mono web applications.
How to place service to subfolder ?

Andrus.

Description: HTTP 500. Error processing request.

Stack Trace:

System.Web.HttpException: Type MyApp.Service.StockService not found.
  at System.Web.UI.SimpleWebHandlerParser.GetTypeFromBin (System.String
tname) [0x00000]
  at System.Web.Compilation.SimpleBuildProvider.LoadTypeFromBin
(System.Web.Compilation.BaseCompiler compiler,
System.Web.UI.SimpleWebHandlerParser parser) [0x00000]
  at System.Web.Compilation.GenericBuildProvider`1[TParser].GetGeneratedType
(System.CodeDom.Compiler.CompilerResults results) [0x00000]
  at System.Web.Compilation.BuildManager+BuildCacheItem..ctor
(System.Reflection.Assembly assembly, System.Web.Compilation.BuildProvider
bp, System.CodeDom.Compiler.CompilerResults results) [0x00000]
  at System.Web.Compilation.BuildManager.GenerateAssembly
(System.Web.Compilation.AssemblyBuilder abuilder,
System.Collections.Generic.List`1 buildItems, System.Web.VirtualPath
virtualPath, BuildKind buildKind) [0x00000]
  at System.Web.Compilation.BuildManager.BuildAssembly
(System.Web.VirtualPath virtualPath) [0x00000]
  at System.Web.Compilation.BuildManager.GetCompiledType (System.String
virtualPath) [0x00000]
  at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler
(System.Web.HttpContext context, System.String verb, System.String url,
System.String filePath) [0x00000]
  at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context,
System.String url, Boolean ignoreContextHandler) [0x00000]
  at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context,
System.String url) [0x00000]
  at System.Web.HttpApplication+<Pipeline>c__Iterator2.MoveNext () [0x00000]

--------------------------------------------------------------------------------
Version information: Mono Version: 2.0.50727.1433; ASP.NET Version:
2.0.50727.1433



More information about the Mono-list mailing list