{"id":1694,"date":"2022-08-30T15:18:40","date_gmt":"2022-08-30T15:18:40","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/29\/ajax-call-to-webservice-fails-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:18:40","modified_gmt":"2022-08-30T15:18:40","slug":"ajax-call-to-webservice-fails-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/ajax-call-to-webservice-fails-collection-of-common-programming-errors\/","title":{"rendered":"Ajax call to webservice fails-Collection of common programming errors"},"content":{"rendered":"<p>I have an ajax call to http:\/\/mydomain.com\/ClientServices\/RewardsService.asmx<strong>\/DisableDivAppsAreNotSupported<\/strong><\/p>\n<p>which throws the following error:<\/p>\n<h1><code>Server Error in '\/' Application.<\/code><\/h1>\n<pre>\n\n<\/pre>\n<h2><code><i>Request format is unrecognized for URL unexpectedly ending in '\/DisableDivAppsAreNotSupported'.<\/i><\/code><\/h2>\n<pre> \n\n\n\n<b> Description: <\/b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.\n\n<br \/><br \/>\n\n<b> Exception Details: <\/b>System.InvalidOperationException: Request format is unrecognized for URL unexpectedly ending in '\/DisableDivAppsAreNotSupported'.<br \/><br \/>\n\n<b>Source Error:<\/b> <br \/><br \/>\n\n<\/pre>\n<table width=\"100%\" bgcolor=\"#FFFFCC\">\n<tr>\n<td><code>An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.<\/code><\/td>\n<\/tr>\n<\/table>\n<p><\/p>\n<p>Why doesn&#8217;t it recognize the op at the end of the url?<\/p>\n<ol>\n<li>\n<p>Your URL is incorrect. Try:<\/p>\n<pre><code>http:\/\/mydomain.com\/ClientServices\/RewardsService.asmx\/DisableDivAppsAreNotSupported\n<\/code><\/pre>\n<p>A couple additional things to check:<\/p>\n<ul>\n<li>\n<p>Ensure that script services is enabled <code>[System.Web.Script.Services.ScriptService]<\/code><\/p>\n<\/li>\n<li>\n<p>Ensure net&#8217;s expecting JSON <code>[ScriptMethod(ResponseFormat=ResponseFormat.Json)]<\/code><\/p>\n<\/li>\n<li>\n<p>Ensure <code>get<\/code> and <code>post<\/code> are enabled:<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<pre><code>\n    \n    \n        \n            \n            \n        \n    \n    \n\n<\/code><\/pre>\n<\/blockquote>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-29 06:06:35. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I have an ajax call to http:\/\/mydomain.com\/ClientServices\/RewardsService.asmx\/DisableDivAppsAreNotSupported which throws the following error: Server Error in &#8216;\/&#8217; Application. Request format is unrecognized for URL unexpectedly ending in &#8216;\/DisableDivAppsAreNotSupported&#8217;. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1694","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1694"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1694\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}