<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>aspdotnetwebapi — Attach to Process</title>
    <link>https://devblog.dinobansigan.com/tag:aspdotnetwebapi</link>
    <description>Thoughts and Notes on Software Development</description>
    <pubDate>Fri, 20 Nov 2026 01:39:27 +0000</pubDate>
    <image>
      <url>https://i.snap.as/4wmUdb6N.png</url>
      <title>aspdotnetwebapi — Attach to Process</title>
      <link>https://devblog.dinobansigan.com/tag:aspdotnetwebapi</link>
    </image>
    <item>
      <title>Increase WCF Service Call Timeout in ASP.NET Web API Project</title>
      <link>https://devblog.dinobansigan.com/increase-wcf-service-call-timeout-in-asp-net-web-api-project?pk_campaign=rss-feed</link>
      <description>A few months ago, I ran into a situation where I had to increase the timeout for a WCF service call, that my ASP.NET Web API was making. ...</description>
      <content:encoded><![CDATA[<p>A few months ago, I ran into a situation where I had to increase the timeout for a WCF service call, that my ASP.NET Web API was making. It wasn&#39;t as straightforward as just adding configuration to a config file, like you would do with a WCF service. You actually have to do it in code. The answers to the stackoverflow question listed below, helped a lot in figuring out a solution for it.</p>

<p>Link: <a href="https://stackoverflow.com/questions/53046380/how-to-increase-the-timeout-values-for-a-wcf-service-in-a-dot-net-core-2-1-proje">How to increase the timeout values for a WCF service in a dot net core 2.1 project – Stack Overflow</a></p>

<p>In your Web API code, you can create a partial class for the WCF client you are trying to call. In that class, you should be able to get to the <a href="https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.description.serviceendpoint?view=dotnet-plat-ext-5.0">Endpoint</a> object. This object allows you get to the WCF bindings where you can set the timeout values. Then you can do something similar to the code I have below to set the timeouts.</p>

<pre><code class="language-c">TimeSpan timeSpan = new TimeSpan(hours: 0, minutes: 0, seconds: timeoutInSeconds);
Endpoint.Binding.CloseTimeout = timeSpan;
Endpoint.Binding.OpenTimeout = timeSpan;
Endpoint.Binding.ReceiveTimeout = timeSpan;
Endpoint.Binding.SendTimeout = timeSpan;
</code></pre>

<p><em>Tags: <a href="https://devblog.dinobansigan.com/tag:AspDotNet" class="hashtag"><span>#</span><span class="p-category">AspDotNet</span></a> <a href="https://devblog.dinobansigan.com/tag:AspDotNetWebApi" class="hashtag"><span>#</span><span class="p-category">AspDotNetWebApi</span></a> <a href="https://devblog.dinobansigan.com/tag:WCF" class="hashtag"><span>#</span><span class="p-category">WCF</span></a></em></p>

<p><strong><a href="https://remark.as/p/devblog.dinobansigan.com/increase-wcf-service-call-timeout-in-asp-net-web-api-project">Discuss...</a></strong> or leave a comment below.</p>
]]></content:encoded>
      <guid>https://devblog.dinobansigan.com/increase-wcf-service-call-timeout-in-asp-net-web-api-project</guid>
      <pubDate>Mon, 12 Jul 2021 17:30:22 +0000</pubDate>
    </item>
  </channel>
</rss>