加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – web.config中的maxRequestLength发生内部错误

发布时间:2020-12-16 07:37:21 所属栏目:asp.Net 来源:网络整理
导读:嗨,大家好,我想让我的用户上传大尺寸的文件,所以我将我的web.config更改为: configuration configSections sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup,System,Version=4.0.0.0,Culture=neutral,PublicK
嗨,大家好,我想让我的用户上传大尺寸的文件,所以我将我的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,PublicKeyToken=" requirePermission="false" />
      </sectionGroup>
    </configSections>
        <system.web>
      <compilation debug="true" targetFramework="4.0">
         <assemblies>
          <add assembly="System.Design,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内部服务器错误您正在查找的资源存在问题,并且无法显示.

解决方法

把它作为答案:)

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

<httpRuntime />

以及

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读