﻿
{"id":3530,"date":"2016-02-24T16:39:06","date_gmt":"2016-02-24T16:39:06","guid":{"rendered":"http:\/\/www.gencayyildiz.com\/blog\/?p=3530"},"modified":"2016-02-24T16:39:06","modified_gmt":"2016-02-24T16:39:06","slug":"web-service-endpoint-hatasi-ve-cozumu","status":"publish","type":"post","link":"https:\/\/www.gencayyildiz.com\/blog\/web-service-endpoint-hatasi-ve-cozumu\/","title":{"rendered":"Web Service &#8211; Endpoint Hatas\u0131 ve \u00c7\u00f6z\u00fcm\u00fc"},"content":{"rendered":"<div id=\"fb-root\"><\/div>\n<p>Bir web service ile \u00e7al\u0131\u015facaks\u0131n\u0131z ve gerekli t\u00fcm entegrasyon i\u015flemlerini ba\u015far\u0131yla tamamlad\u0131n\u0131z. Web Service&#8217;den verilerinizi \u00e7ektiniz, modifike ettiniz ve art\u0131k projeyi \u00e7al\u0131\u015ft\u0131rma zaman\u0131 geldi. Hooopp a\u015fa\u011f\u0131daki beklenmedik ama olas\u0131 hatayla y\u00fczy\u00fcze geldiniz&#8230;<\/p>\n<p style=\"text-align: center;\"><span style=\"color: #ff0000;\"><em><strong>&#8220;An unhandled exception of type &#8216;System.InvalidOperationException&#8217; occurred in System.ServiceModel.dll<\/strong><\/em><\/span><\/p>\n<p style=\"text-align: center;\"><span style=\"color: #ff0000;\"><em><strong>Additional information: \u0130lgili s\u00f6zle\u015fme i\u00e7in birden fazla biti\u015f noktas\u0131 yap\u0131land\u0131rmas\u0131 bulundu\u011fundan &#8216;&#8230;&#8217; s\u00f6zle\u015fmesi biti\u015f noktas\u0131 yap\u0131land\u0131rma b\u00f6l\u00fcm\u00fc y\u00fcklenemedi. Tercih edilen biti\u015f noktas\u0131 yap\u0131land\u0131rmas\u0131 b\u00f6l\u00fcm\u00fcn\u00fc ad\u0131yla belirtin.&#8221;<\/strong><\/em><\/span><\/p>\n<p style=\"text-align: left;\">Hatam\u0131z\u0131n g\u00f6rsel halinide g\u00f6relim&#8230;<\/p>\n<div id=\"attachment_3531\" style=\"width: 457px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/02\/Web-Service-Endpoint-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc.png\" rel=\"attachment wp-att-3531\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3531\" class=\"wp-image-3531 size-full\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/02\/Web-Service-Endpoint-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc.png\" alt=\"Web Service - Endpoint Hatas\u0131 ve \u00c7\u00f6z\u00fcm\u00fc\" width=\"447\" height=\"417\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/02\/Web-Service-Endpoint-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc.png 447w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2016\/02\/Web-Service-Endpoint-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-300x280.png 300w\" sizes=\"auto, (max-width: 447px) 100vw, 447px\" \/><\/a><p id=\"caption-attachment-3531\" class=\"wp-caption-text\">Web Service &#8211; Endpoint Hatas\u0131 ve \u00c7\u00f6z\u00fcm\u00fc<\/p><\/div>\n<h2>Web Service &#8211; Endpoint Hatas\u0131n\u0131 Nas\u0131l D\u00fczeltece\u011fiz?<\/h2>\n<p>Bu i\u015fin s\u0131rr\u0131 App.config dosyas\u0131nda sakl\u0131 \ud83d\ude42<\/p>\n<p>\u0130lgili dosyay\u0131 a\u00e7arsak a\u015fa\u011f\u0131daki gibi bir kod blo\u011fuyla kar\u015f\u0131laca\u011f\u0131z.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;\r\n&lt;configuration&gt;\r\n    &lt;startup&gt; \r\n        &lt;supportedRuntime version=&quot;v4.0&quot; sku=&quot;.NETFramework,Version=v4.5.2&quot; \/&gt;\r\n    &lt;\/startup&gt;\r\n    &lt;system.serviceModel&gt;\r\n        &lt;bindings&gt;\r\n            &lt;basicHttpBinding&gt;\r\n                &lt;binding name=&quot;GlobalWeatherSoap&quot; \/&gt;\r\n            &lt;\/basicHttpBinding&gt;\r\n            &lt;customBinding&gt;\r\n                &lt;binding name=&quot;GlobalWeatherSoap12&quot;&gt;\r\n                    &lt;textMessageEncoding messageVersion=&quot;Soap12&quot; \/&gt;\r\n                    &lt;httpTransport \/&gt;\r\n                &lt;\/binding&gt;\r\n            &lt;\/customBinding&gt;\r\n        &lt;\/bindings&gt;\r\n        &lt;client&gt;\r\n            &lt;endpoint address=&quot;http:\/\/www.webservicex.net\/globalweather.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;GlobalWeatherSoap&quot; contract=&quot;ServiceReference1.GlobalWeatherSoap&quot; name=&quot;GlobalWeatherSoap&quot; \/&gt;\r\n            &lt;endpoint address=&quot;http:\/\/www.webservicex.net\/globalweather.asmx&quot; binding=&quot;customBinding&quot; bindingConfiguration=&quot;GlobalWeatherSoap12&quot; contract=&quot;ServiceReference1.GlobalWeatherSoap&quot; name=&quot;GlobalWeatherSoap12&quot; \/&gt;\r\n        &lt;\/client&gt;\r\n    &lt;\/system.serviceModel&gt;\r\n&lt;\/configuration&gt;\r\n<\/pre>\n<p>Tabi sizin projenizin kapsam ve \u00e7al\u0131\u015fmas\u0131na g\u00f6re App.config dosyas\u0131 \u015fi\u015fecektir. Haliyle ben en basit haldeki App.config dosyas\u0131 \u00fczerinde sizlere \u00e7\u00f6z\u00fcm\u00fc anlat\u0131yor olaca\u011f\u0131m.<\/p>\n<p>&#8220;client&#8221; node&#8217;\u0131na dikkat ederseniz e\u011fer i\u00e7inde &#8220;endpoint&#8221; nodelar\u0131 mevcut. Hatam\u0131z buradan kaynaklanmaktad\u0131r. Bir Web Service&#8217;i sadece bir &#8220;endpoint&#8221; node\u0131na tan\u0131mlamam\u0131z gerekmektedir. Yukar\u0131da g\u00f6rd\u00fc\u011f\u00fcn\u00fcz gibi(ki sizde de ayn\u0131 tablo mevcut) ayn\u0131 Web Service birden fazla endpoint ile tan\u0131mlanm\u0131\u015ft\u0131r.<\/p>\n<p>Burada yapmam\u0131z gereken i\u015flem bir Web Service&#8217;e bir adet &#8220;endpoint&#8221; kalacak \u015fekilde sadele\u015ftirmektir. Yani kastetti\u011fim durumu a\u015fa\u011f\u0131daki gibi g\u00fcncellememiz gerekmektedir.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n...\r\n...\r\n...\r\n        &lt;client&gt;\r\n            &lt;endpoint address=&quot;http:\/\/www.webservicex.net\/globalweather.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;GlobalWeatherSoap&quot; contract=&quot;ServiceReference1.GlobalWeatherSoap&quot; name=&quot;GlobalWeatherSoap&quot; \/&gt;\r\n        &lt;\/client&gt;\r\n...\r\n...\r\n...\r\n<\/pre>\n<p>G\u00f6rd\u00fc\u011f\u00fcn\u00fcz gibi &#8220;http:\/\/www.webservicex.net\/globalweather.asmx&#8221; Web Service&#8217;ini sadece tek bir endpoint tutacak hale getirdim.<\/p>\n<p>Projeyi derleyip \u00e7al\u0131\u015ft\u0131rd\u0131\u011f\u0131m\u0131z zaman hatan\u0131n ortadan kalkt\u0131\u011f\u0131n\u0131 g\u00f6receksiniz&#8230;<\/p>\n<p>Hepinize iyi \u00e7al\u0131\u015fmalar dilerim&#8230;<br \/>\nSonraki yaz\u0131larda g\u00f6r\u00fc\u015fmek \u00fczere&#8230;<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Bir web service ile \u00e7al\u0131\u015facaks\u0131n\u0131z ve gerekli t\u00fcm entegrasyon i\u015flemlerini ba\u015far\u0131yla tamamlad\u0131n\u0131z. Web Service&#8217;den verilerinizi \u00e7ektiniz, modifike ettiniz ve art\u0131k projeyi \u00e7al\u0131\u015ft\u0131rma zaman\u0131 geldi. Hooopp a\u015fa\u011f\u0131daki beklenmedik ama olas\u0131 hatayla y\u00fczy\u00fcze geldiniz&#8230; &#8220;An unhandled&#46;&#46;&#46;<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":3531,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,258],"tags":[598,899,900,260,849,484,244,901],"class_list":["post-3530","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-sharp-c","category-hata-cozumleri","tag-cozum","tag-endpoint","tag-endpoint-hatasi","tag-hata","tag-hata-cozumleri","tag-hata-cozumu","tag-web-service","tag-web-service-hatasi"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/3530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/comments?post=3530"}],"version-history":[{"count":0,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/3530\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media\/3531"}],"wp:attachment":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media?parent=3530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/categories?post=3530"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/tags?post=3530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}