2017-10-01 45 views
1

HTTPエラー404.13 - 見つかりません要求フィルタリングモジュールは、要求のコンテンツの長さを超える要求を拒否するように設定されています です。HTTPエラー404.13 - asp.netコア2.0

があるapplicationHost.configまたはweb.configのファイルで configuration/system.webServer/security/requestFiltering/[email protected] 設定を確認してください。

どこでも構いませんが、asp.netコア2では、代わりにappsettings.jsonを使用するように変更されています。

すでにこれを実行しようとしても、動作しません。

services.Configure<FormOptions>(options => 
{ 
    options.MultipartBodyLengthLimit = 300_000_000; 
}); 
+0

Asp.netコアは、web.configファイルを持つことができます参照してください詳細情報についてはProgram.csの

.UseKestrel(o => { o.Limits.MaxRequestBodySize = null; }) 

にこのコードを追加することができます。また、https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration?tabs=basicconfiguration#the-webconfig-fileも参照してください。 – Styxxy

答えて

2

IISを使用している場合は、asp.netコア2.0アプリケーションにweb.configを追加する必要があります。エルス

<?xml version="1.0" encoding="utf-8"?> 
<configuration> 
    <system.webServer> 
    <security> 
     <requestFiltering> 
     <!-- This will handle requests up to 700MB (CD700) --> 
     <requestLimits maxAllowedContentLength="737280000" /> 
     </requestFiltering> 
    </security> 
    </system.webServer> 
</configuration> 

、[RequestSizeLimit(long.MaxValue)]またはお使いのコントローラで[DisableRequestSizeLimit]属性を使用します。

また、あなたがIISでそれをホストする場合、このhttps://github.com/aspnet/Announcements/issues/267

関連する問題