title: System.Web.HttpException with "Type Service not found." in Mono ASP.NET Web Service
body: <p>I am using mono v4.2.1 and apache2 in ubuntu 14.04</p>
  
  <p>I managed to install my ASP.NET web service in the url: <a href="http://myurl/WebService/Service.asmx" rel="nofollow">http://myurl/WebService/Service.asmx</a></p>
  
  <p>But when I open it, I receive this error:</p>
  
  <pre><code>System.Web.HttpException
  Type Service not found.
  
  Description: HTTP 500.Error processing request.
  Details: Error processing request.
  Exception stack trace:
    at System.Web.UI.SimpleWebHandlerParser.GetTypeFromBin (System.String tname) &lt;0x40f053e0 + 0x00894&gt; in &lt;filename unknown&gt;:0 
    at System.Web.Compilation.SimpleBuildProvider.LoadTypeFromBin (System.Web.Compilation.BaseCompiler compiler, System.Web.UI.SimpleWebHandlerParser parser) &lt;0x40f053a0 + 0x00026&gt; in &lt;filename unknown&gt;:0 
    at System.Web.Compilation.GenericBuildProvider`1[TParser].GetGeneratedType (System.CodeDom.Compiler.CompilerResults results) &lt;0x40f05150 + 0x00085&gt; in &lt;filename unknown&gt;:0 
    at System.Web.Compilation.BuildManagerCacheItem..ctor (System.Reflection.Assembly assembly, System.Web.Compilation.BuildProvider bp, System.CodeDom.Compiler.CompilerResults results) &lt;0x40f04fc0 + 0x00101&gt; in &lt;filename unknown&gt;:0 
    at System.Web.Compilation.BuildManager.StoreInCache (System.Web.Compilation.BuildProvider bp, System.Reflection.Assembly compiledAssembly, System.CodeDom.Compiler.CompilerResults results) &lt;0x40f04a60 + 0x0009f&gt; in &lt;filename unknown&gt;:0 
    at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, Boolean debug) &lt;0x40f00ff0 + 0x00b94&gt; in &lt;filename unknown&gt;:0 
    at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug) &lt;0x40ee7490 + 0x00579&gt; in &lt;filename unknown&gt;:0 
    at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp) &lt;0x40ee6df0 + 0x00149&gt; in &lt;filename unknown&gt;:0 
    at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath) &lt;0x40ee6a30 + 0x000b7&gt; in &lt;filename unknown&gt;:0 
    at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) &lt;0x40ee65c0 + 0x00024&gt; in &lt;filename unknown&gt;:0 
    at System.Web.UI.WebServiceParser.GetCompiledType (System.String inputFile, System.Web.HttpContext context) &lt;0x40ee65a0 + 0x00014&gt; in &lt;filename unknown&gt;:0 
    at System.Web.Services.Protocols.WebServiceHandlerFactory.GetCompiledType (System.String url, System.Web.HttpContext context) &lt;0x40ee6570 + 0x00022&gt; in &lt;filename unknown&gt;:0 
    at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler (System.Web.HttpContext context, System.String verb, System.String url, System.String filePath) &lt;0x40edf510 + 0x0014a&gt; in &lt;filename unknown&gt;:0 
    at System.Web.Script.Services.ScriptHandlerFactory.GetHandler (System.Web.HttpContext context, System.String requestType, System.String url, System.String pathTranslated) &lt;0x40edf050 + 0x00241&gt; in &lt;filename unknown&gt;:0 
    at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url, Boolean ignoreContextHandler) &lt;0x40ed71f0 + 0x002f3&gt; in &lt;filename unknown&gt;:0 
    at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url) &lt;0x40ed71b0 + 0x00020&gt; in &lt;filename unknown&gt;:0 
    at System.Web.HttpApplication+&lt;Pipeline&gt;c__Iterator1.MoveNext () &lt;0x40ebcf60 + 0x02b62&gt; in &lt;filename unknown&gt;:0 
  </code></pre>
  
  <p>This is my Service.asmx:</p>
  
  <pre><code>&lt;%@ WebService Language="C#" Class="Service" %&gt;
  </code></pre>
  
  <p>And the Service class is in a library which is added by reference:</p>
  
  <pre><code>using System.Web.Services;
  
  [WebService(Namespace = "http://myurl/")]
  [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
  public class Service : WebService
  {
      public Service()
      {
      }
  }
  </code></pre>
  
  <p>The point is it works completely OK in <strong>Microsoft Visual Studio</strong> but mono has a problem and I don't know where to look or what to do.</p>