{"id":5778,"date":"2014-04-07T09:04:17","date_gmt":"2014-04-07T09:04:17","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/07\/why-am-i-having-an-ambiguous-type-error-when-calling-a-webmethod-on-asp-net-web-application-collection-of-common-programming-errors\/"},"modified":"2014-04-07T09:04:17","modified_gmt":"2014-04-07T09:04:17","slug":"why-am-i-having-an-ambiguous-type-error-when-calling-a-webmethod-on-asp-net-web-application-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/07\/why-am-i-having-an-ambiguous-type-error-when-calling-a-webmethod-on-asp-net-web-application-collection-of-common-programming-errors\/","title":{"rendered":"Why am I having an ambiguous type error when calling a WebMethod on ASP.NET Web Application?-Collection of common programming errors"},"content":{"rendered":"<p>The message sent to browser is as follows:<\/p>\n<blockquote>\n<p>The type My.API.Class is ambiguous: it could come from assembly &#8216;[on Temporary ASP.NET Files]&#8217; or from assembly &#8216;[on bin folder]&#8217;<\/p>\n<\/blockquote>\n<p>The problem occurs when debugging a Web App, specifically when making a request to a WebMethod of a WebService.<\/p>\n<p>The project compiles just right. It generates My.Website.dll on bin folder and if I publish the Web Application. It works fine.<\/p>\n<p>The asmx file is on the root of the application. The CodeBehind file is on App_Code and its marked to be compiled to generate My.Website.dll.<\/p>\n<p>I should be missing something really important.<\/p>\n<p>I found someone having the same issue with a possible related cause. Check it out. The way this person exposes its problem is somehow similar but I get starting to be lost when he talks about a proxy class and shared dlls I don&#8217;t use.<\/p>\n<p>Any help is appreciated.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The message sent to browser is as follows: The type My.API.Class is ambiguous: it could come from assembly &#8216;[on Temporary ASP.NET Files]&#8217; or from assembly &#8216;[on bin folder]&#8217; The problem occurs when debugging a Web App, specifically when making a request to a WebMethod of a WebService. The project compiles just right. It generates My.Website.dll [&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-5778","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5778","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=5778"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5778\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5778"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}