2016-04-22 20 views
3

イメージのアップロード時にプロジェクトを実行中に、ブラウザにこのエラーが表示されます。 私はSQl Serverをデータベースとして使用しています。ファイルアップロードの実行中にエラーが発生しました。

`Server Error in '/' Application. 
Maximum request length exceeded. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
Exception Details: System.Web.HttpException: Maximum request length exceeded. 
Source Error: 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
Stack Trace: 
[HttpException (0x80004005): Maximum request length exceeded.] 
    System.Web.HttpRequest.GetEntireRawContent() +9803702 
    System.Web.HttpRequest.GetMultipartContent() +63 
    System.Web.HttpRequest.FillInFormCollection() +160 
    System.Web.HttpRequest.EnsureForm() +69 
    System.Web.HttpRequest.get_Form() +13 
    System.Web.HttpRequest.get_HasForm() +9800635 
    System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +95 
    System.Web.UI.Page.DeterminePostBackMode() +69 
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +220 
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1073.0` 

SQlサーバーのファイルアップロード中に制限はありますか?

答えて

2

このエラーは、SQLサーバーではなくWebサーバーによって発生します。

IISを使用している場合は、大きなファイルをアップロードできるようにweb.configを変更できます。 IISバージョン7以上の場合

<configuration> 
    <system.web> 
     <httpRuntime maxRequestLength="xxxxxx" /> 
    </system.web> 
</configuration> 

、以下を使用し..

<system.webServer> 
    <security> 
     <requestFiltering> 
     <requestLimits maxAllowedContentLength="xxxxxxx" /> 
     </requestFiltering> 
    </security> 
</system.webServer> 

上記の例もhere

から取得され、thisを読んでください。

+0

なぜ元の回答にリンクしたのですか? http://stackoverflow.com/questions/3853767/maximum-request-length-exceeded – Tushar

+0

申し訳ありません..iは、設定ファイルに正しい構文が表示されるように複数のソースを使用しています。私は自分の答えを修正しました – cableload

+0

盗作は勧められません。あなたがソースを知っていたら、それを属性にしてください。あなたは同じことをコメントできました – Tushar

関連する問題