gpt4 book ai didi

asp.net - web.config 中的 maxRequestLength 导致内部错误

转载 作者:行者123 更新时间:2023-12-03 22:45:13 26 4
gpt4 key购买 nike

我想允许我的用户上传巨大的文件,所以我将我的 web.config 更改为:

     <configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=" >
<section name="delegatezanjan.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken="/>
</assemblies>
</compilation>
<httpRuntime/>
<httpRuntime maxRequestLength="200000" executionTimeout="99999"/>
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="smsSendWebServiceSoap" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://aryanmsg.ir/smsSendWebService.asmx"
binding="basicHttpBinding" bindingConfiguration="smsSendWebServiceSoap"
contract="ServiceReference1.smsSendWebServiceSoap" name="smsSendWebServiceSoap" />
</client>
</system.serviceModel>
<applicationSettings>
<delegatezanjan.Properties.Settings>
<setting name="delegatezanjan_ir_smsline_webservice_SMS_WebServer_Service"
serializeAs="String">
<value></value>
</setting>
</delegatezanjan.Properties.Settings>
</applicationSettings>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483648" />
</requestFiltering>
</security>
</system.webServer>
</configuration>
在添加这部分之前,我的代码可以工作,但是在添加最后 3 行之后,我的网站返回 500 内部服务器错误:

There is a problem with the resource you are looking for, and it cannot be displayed.

最佳答案

把它作为答案:)

您已经在配置中两次声明了 httpRuntime。你有

<httpRuntime /> 


<httpRuntime maxRequestLength="2000000000" executionTimeout="99999999"/>

关于asp.net - web.config 中的 maxRequestLength 导致内部错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22094701/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com