Bug 7106 - WCF JSON service does not match uri correctly
Summary: WCF JSON service does not match uri correctly
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: WCF assemblies (show other bugs)
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-09-12 13:52 UTC by Dylan Borg
Modified: 2012-10-25 02:58 UTC (History)
2 users (show)

Tags: wcf json ajax webhttpbinding webhttp
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 7106 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 Dylan Borg 2012-09-12 13:52:07 UTC
When I try to call the service through an HTTP POST from a jQuery AJAX call the service fails and returns a html page with:

Application Exception
System.InvalidOperationException
HttpListenerContext does not match any of the registered channels

Description: HTTP 500.Error processing request.

Details: Non-web exception. Exception origin (name of application or object): System.ServiceModel.
Exception stack trace:
at System.ServiceModel.Channels.Http.HttpListenerManager.ProcessNewContext (System.ServiceModel.Channels.Http.HttpContextInfo ctxi) [0x00000] in <filename unknown>:0 at System.ServiceModel.Channels.SvcHttpHandler.ProcessRequest (System.Web.HttpContext context) [0x00000] in <filename unknown>:0 at System.Web.HttpApplication+<Pipeline>c__Iterator6.MoveNext () [0x00000] in <filename unknown>:0 at System.Web.HttpApplication.Tick () [0x00000] in <filename unknown>:0
Version Information: 2.11.3 (tarball Fri Aug 24 15:12:38 UTC 2012); ASP.NET Version: 4.0.30319.17020

I have specified that the request and response should both be JSON in the service contract and configured a webHttpBinding endpoint in the configuration file.

The uri template was set to "/getcar?id={id}" and the js for the request was:
$(
	function() {
		$.ajax({
		  type: "POST",
  			contentType: "application/json; charset=utf-8",
  			url: "service1/getcar?id=1",
			data: JSON.stringify({}),
  			dataType: "json"
		});
	}
);

When I go to the url for the service it gives me the impression that it is working by showinng the following message:
To create client proxy source, run:

svcutil http://localhost/testsvc/service1.svc?wsdl

The wsdl xml file is made as well  if I go to the indicated url.
Comment 1 Dylan Borg 2012-09-13 06:08:08 UTC
I tried a service method that is parameterless but it still returns the same error.