<br />
<b>Deprecated</b>:  YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container::__construct(): Implicitly marking parameter $parameterBag as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Container.php</b> on line <b>60</b><br />
<br />
<b>Deprecated</b>:  YoastSEO_Vendor\League\OAuth2\Client\Provider\AbstractProvider::authorize(): Implicitly marking parameter $redirectHandler as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Provider/AbstractProvider.php</b> on line <b>416</b><br />
<br />
<b>Deprecated</b>:  YoastSEO_Vendor\GuzzleHttp\Client::getConfig(): Implicitly marking parameter $option as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Client.php</b> on line <b>181</b><br />
<br />
<b>Deprecated</b>:  YoastSEO_Vendor\GuzzleHttp\ClientInterface::getConfig(): Implicitly marking parameter $option as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/ClientInterface.php</b> on line <b>77</b><br />
{"id":965,"date":"2012-06-15T23:49:00","date_gmt":"2012-06-15T21:49:00","guid":{"rendered":"https:\/\/blog.sharedove.com\/adisjugo\/?p=965"},"modified":"2012-06-15T23:49:00","modified_gmt":"2012-06-15T21:49:00","slug":"an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service","status":"publish","type":"post","link":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/","title":{"rendered":"\u201cAn existing connection was forcibly closed by the remote host\u201d error in WCF service"},"content":{"rendered":"<p>For a difference, a post that has nothing to do with SharePoint, but rather with WCF. In my team today, we had a really strange behavior of one of our web services. Everything was ok, except in one method, which was always on the client side throwing the following exception:<\/p>\n<p><!--more--><\/p>\n<blockquote>\n<p>\u201cAn error occurred while receiving the HTTP response to http:\/\/ServiceHost\/ServiceName.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.\u201d<\/p>\n<\/blockquote>\n<p>Looking at the inner exceptions, two more levels could be noticed:<\/p>\n<blockquote>\n<p>The underlying connection was closed: An unexpected error occurred on a receive.<\/p>\n<\/blockquote>\n<p>and<\/p>\n<blockquote>\n<p>An existing connection was forcibly closed by the remote host<\/p>\n<\/blockquote>\n<p>Googling it didn\u2019t happen too much \u2013 some answers were going into direction that complex objects can not be serialized (which is not true, by the way), and other answers were going into direction that the serialized message length was too large, and that the maxRequestLength should be increased in web.config, something like:<\/p>\n<blockquote>\n<p>&lt;httpRuntime maxRequestLength=\u201dXyz\u201d\u2026. \/&gt;<\/p>\n<\/blockquote>\n<p>But hey, we were in the test phase, and our serialized messages were really small, this could not be it\u2026<\/p>\n<p>\u2026or wait, could it be?<\/p>\n<p>I looked again on our objects that we are serializing, and saw something like<\/p>\n<pre class=\"brush: csharp; title: Code sample:; notranslate\" title=\"Code sample:\">\npublic class MyClass\n{\n    public int Id { get; set; }\n\t\n    public string Name { get; set; }\n\t\n    public MyClass Parent { get; set; }\n\t\n    public List&lt;MyClass&gt; Children { get; set; }\t\n}\n<\/pre>\n<p>OK, that\u2019s it. In an instance of the object, we hold the instance of the parent object, and list of instances of the children objects. And while that\u2019s ok in .NET class, because we are dealing with the \u201cpointers\u201d to the parent and child objects, it looks much different when we serialize it. It serializes the object, then it\u2019s parent object, then the children of the parent object (our starting object is among them), then again the parent\u2026 And it serializes infinitely. Until we hit the maximal message size, whatever it would be.<\/p>\n<p>Now, once the problem was diagnosed, the solution was also more than simple \u2013 we just put the DataContract attribute on the object, and exclude the &#8220;Parent&#8221; object property from the contract. Instead, we created a ParentObjectId property, getter only, which only returns the parent\u2019s id. <\/p>\n<pre class=\"brush: csharp; title: Code sample:; notranslate\" title=\"Code sample:\">\n&#x5B;DataContract]\npublic class MyClass\n{\n    &#x5B;DataMember]\n    public int Id { get; set; }\n    \n    &#x5B;DataMember]\n    public string Name { get; set; }\n    \n    \/\/Notice - no &#x5B;DataMember] here...\n    public MyClass Parent { get; set; }\n    \n    &#x5B;DataMember]\n    public int ParentId \n    {\n        get\n        {\n            return this.Parent.id;\n        }\n    }\n    \n    &#x5B;DataMember]\n    public List&lt;MyClass&gt; Children { get; set; }\n}\n<\/pre>\n<p>And voila \u2013 in the .NET libraries, we can still use the beauty of parent and children collection objects, and when we serialize it, we use the parent ids. Works like a champ. Simple problem, simple solution, but it has caused some thinking on our side.<\/p>\n<p>PS. Btw, don&#8217;t you love the WCF Exceptions? They are the only one that compare to SharePoint exception in providing senseful information.<\/p>\n<div class=\"fb-background-color\">\n\t\t\t  <div \n\t\t\t  \tclass = \"fb-comments\" \n\t\t\t  \tdata-href = \"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/\"\n\t\t\t  \tdata-numposts = \"59\"\n\t\t\t  \tdata-lazy = \"true\"\n\t\t\t\tdata-colorscheme = \"light\"\n\t\t\t\tdata-order-by = \"time\"\n\t\t\t\tdata-mobile=true>\n\t\t\t  <\/div><\/div>\n\t\t  <style>\n\t\t    .fb-background-color {\n\t\t\t\tbackground:  !important;\n\t\t\t}\n\t\t\t.fb_iframe_widget_fluid_desktop iframe {\n\t\t\t    width: 100% !important;\n\t\t\t}\n\t\t  <\/style>\n\t\t  ","protected":false},"excerpt":{"rendered":"<p>For a difference, a post that has nothing to do with SharePoint, but rather with WCF. In my team today, we had a really strange behavior of one of our web services. Everything was ok, except in one method, which was always on the client side throwing the following exception:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[11],"tags":[67],"class_list":["post-965","post","type-post","status-publish","format-standard","hentry","category-development","tag-wcf"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u201cAn existing connection was forcibly closed by the remote host\u201d error in WCF service - Adis Jugo blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u201cAn existing connection was forcibly closed by the remote host\u201d error in WCF service - Adis Jugo blog\" \/>\n<meta property=\"og:description\" content=\"For a difference, a post that has nothing to do with SharePoint, but rather with WCF. In my team today, we had a really strange behavior of one of our web services. Everything was ok, except in one method, which was always on the client side throwing the following exception:\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/\" \/>\n<meta property=\"og:site_name\" content=\"Adis Jugo blog\" \/>\n<meta property=\"article:published_time\" content=\"2012-06-15T21:49:00+00:00\" \/>\n<meta name=\"author\" content=\"adis.jugo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"adis.jugo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/\",\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/\",\"name\":\"\u201cAn existing connection was forcibly closed by the remote host\u201d error in WCF service - Adis Jugo blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#website\"},\"datePublished\":\"2012-06-15T21:49:00+00:00\",\"author\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.sharedove.com\/adisjugo\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u201cAn existing connection was forcibly closed by the remote host\u201d error in WCF service\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#website\",\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/\",\"name\":\"Adis Jugo blog\",\"description\":\"The Southern Side\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.sharedove.com\/adisjugo\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c\",\"name\":\"adis.jugo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g\",\"caption\":\"adis.jugo\"},\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/author\/adisjugo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u201cAn existing connection was forcibly closed by the remote host\u201d error in WCF service - Adis Jugo blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/","og_locale":"en_US","og_type":"article","og_title":"\u201cAn existing connection was forcibly closed by the remote host\u201d error in WCF service - Adis Jugo blog","og_description":"For a difference, a post that has nothing to do with SharePoint, but rather with WCF. In my team today, we had a really strange behavior of one of our web services. Everything was ok, except in one method, which was always on the client side throwing the following exception:","og_url":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/","og_site_name":"Adis Jugo blog","article_published_time":"2012-06-15T21:49:00+00:00","author":"adis.jugo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"adis.jugo","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/","url":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/","name":"\u201cAn existing connection was forcibly closed by the remote host\u201d error in WCF service - Adis Jugo blog","isPartOf":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/#website"},"datePublished":"2012-06-15T21:49:00+00:00","author":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c"},"breadcrumb":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2012\/06\/15\/an-existing-connection-was-forcibly-closed-by-the-remote-host-error-in-wcf-service\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.sharedove.com\/adisjugo\/"},{"@type":"ListItem","position":2,"name":"\u201cAn existing connection was forcibly closed by the remote host\u201d error in WCF service"}]},{"@type":"WebSite","@id":"https:\/\/blog.sharedove.com\/adisjugo\/#website","url":"https:\/\/blog.sharedove.com\/adisjugo\/","name":"Adis Jugo blog","description":"The Southern Side","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.sharedove.com\/adisjugo\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c","name":"adis.jugo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g","caption":"adis.jugo"},"url":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/author\/adisjugo\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/posts\/965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/comments?post=965"}],"version-history":[{"count":0,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/posts\/965\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/media?parent=965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/categories?post=965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/tags?post=965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}