<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kuxumarin</author_name>
  <author_url>https://blog.hatena.ne.jp/kuxumarin/</author_url>
  <blog_title>くうと徒然なるままに</blog_title>
  <blog_url>https://kuxumarin.hatenablog.com/</blog_url>
  <categories>
    <anon>ASP.NET Core</anon>
  </categories>
  <description>ASP.NET Core を使っていて Body に入っているデータの長さを調べようとすることはよくあると思います。 そんなときに、 Request.bdy.Length を呼び出すと NotSupportedException を吐いてしまいました。 原因 Request.Body は Stream ですが、 Length などを呼び出す能力のない Stream 実装が入っています。（速度向上のためなのかな？） そこで、一度別のストリームにコピーしてからなら使えるようになります。 コード [HttpPost] public async Task&lt;ActionResult&gt; Upload() …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkuxumarin.hatenablog.com%2Fentry%2F2017%2F11%2F27%2F112047&quot; title=&quot;ASP.NET Core で Request.Body.Length を読もうとすると NotSupported Exception を吐くから解決してみた - くうと徒然なるままに&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-11-27 11:20:47</published>
  <title>ASP.NET Core で Request.Body.Length を読もうとすると NotSupported Exception を吐くから解決してみた</title>
  <type>rich</type>
  <url>https://kuxumarin.hatenablog.com/entry/2017/11/27/112047</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
