Bug 60987 - ASMX web service doesn't work with ASP.NET 4.0
Summary: ASMX web service doesn't work with ASP.NET 4.0
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web.Services ()
Version: 5.4 (2017-06)
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-12-05 13:21 UTC by f.lemaire
Modified: 2017-12-05 13:21 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 60987 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description f.lemaire 2017-12-05 13:21:23 UTC
Mono's exact version is 5.4.1.6. We have a very simple asmx web service with no CodeBehind (the class resides in a compiled assembly placed in the bin directory); the .asmx file just has the following directive :

<%@ WebService Class="Activsoft.LaCollective.Web.SynchronizationService"%>

The dll Activsoft.LaCollective.Web exists in the bin directory, and the SynchronizationService class exists in it too, though it doesn't matter, I can put anything there, it doesn't change the error, which is:

No @webhandler directive found

The stack is as follows:

at System.Web.UI.SimpleWebHandlerParser.GetDirectivesAndContent () [0x001fb] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.UI.SimpleWebHandlerParser..ctor (System.Web.HttpContext context, System.String virtualPath, System.String physicalPath, System.IO.TextReader reader) [0x00156] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.UI.WebHandlerParser..ctor (System.Web.HttpContext context, System.Web.VirtualPath virtualPath, System.String physicalPath, System.IO.TextReader reader) [0x00008] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.Compilation.WebHandlerBuildProvider.CreateParser (System.Web.VirtualPath virtualPath, System.String physicalPath, System.IO.TextReader reader, System.Web.HttpContext context) [0x00000] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.Compilation.GenericBuildProvider`1[TParser].get_Parser () [0x00048] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.Compilation.SimpleBuildProvider.Parse () [0x00000] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.Compilation.GenericBuildProvider`1[TParser].get_LanguageName () [0x00000] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.Compilation.GenericBuildProvider`1[TParser].get_CodeCompilerType () [0x00008] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.Compilation.BuildManagerDirectoryBuilder.GetBuildProviderCodeDomType (System.Web.Compilation.BuildProvider bp) [0x00000] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.Compilation.BuildManagerDirectoryBuilder.AssignToGroup (System.Web.Compilation.BuildProvider buildProvider, System.Collections.Generic.List`1[T] groups) [0x0006b] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.Compilation.BuildManagerDirectoryBuilder.Build (System.Boolean single) [0x00129] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, System.Boolean debug) [0x00017] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp) [0x00058] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath) [0x00037] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) [0x00006] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.UI.WebServiceParser.GetCompiledType (System.String inputFile, System.Web.HttpContext context) [0x00000] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.Services.Protocols.WebServiceHandlerFactory.GetCompiledType (System.String url, System.Web.HttpContext context) [0x00000] in <d721c96dfac84980aa9bf7b85b4922c8>:0 at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler (System.Web.HttpContext context, System.String verb, System.String url, System.String filePath) [0x00047] in <d721c96dfac84980aa9bf7b85b4922c8>:0 at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url, System.Boolean ignoreContextHandler) [0x00059] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url) [0x00000] in <285fcaed03ee42169c0cbd7bda90aaab>:0 at System.Web.HttpApplication+<Pipeline>d__225.MoveNext () [0x00564] in <285fcaed03ee42169c0cbd7bda90aaab>:0 

I've tried putting a webhandler directive, and I get the expected error that the webhandler directive is unexpected. This does work using Microsoft .NET implementation, and we have many such web services working with Mono's ASP.NET 2.0 implementation, but since Debian stable no longer has ASP.NET 2.0, we are forced to use ASP.NET 4.0.