尝试更改最大请求长度时出现 HTTP 错误 500.19
HTTP Error 500.19 When trying to Change Max Reqest Length
我正在尝试将音频文件上传到我的网站的基本功能。我 运行 跨越最大长度错误并使用找到的解决方案 here。但是,每当我尝试 运行 该网站时,我都会收到错误代码为 0x800700b7 的 HTTP 错误 500.19。我的网络配置如下所示:
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5.2"/>
<httpRuntime targetFramework="4.5.2"/>
<httpRuntime maxRequestLength="1048576" />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+"/>
</compilers>
</system.codedom>
</configuration>
我已经在网上搜索过了。我试过 this, and it didn't do anything. I can't do this because I need the line to the malformed lined to change the max length. This 没有帮助我。我该怎么做才能解决这个问题?如果重要的话,我正在使用 C#。
我设法找出了我的问题,并认为我会 post 在这里,以防它能帮助到任何人。结果是:
<httpRuntime targetFramework="4.5.2"/>
<httpRuntime maxRequestLength="1048576" />
应该是:
<httpRuntime targetFramework="4.5.2" maxRequestLength="1048576" />
引用 httpRuntime
两次是问题所在。
我正在尝试将音频文件上传到我的网站的基本功能。我 运行 跨越最大长度错误并使用找到的解决方案 here。但是,每当我尝试 运行 该网站时,我都会收到错误代码为 0x800700b7 的 HTTP 错误 500.19。我的网络配置如下所示:
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5.2"/>
<httpRuntime targetFramework="4.5.2"/>
<httpRuntime maxRequestLength="1048576" />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+"/>
</compilers>
</system.codedom>
</configuration>
我已经在网上搜索过了。我试过 this, and it didn't do anything. I can't do this because I need the line to the malformed lined to change the max length. This 没有帮助我。我该怎么做才能解决这个问题?如果重要的话,我正在使用 C#。
我设法找出了我的问题,并认为我会 post 在这里,以防它能帮助到任何人。结果是:
<httpRuntime targetFramework="4.5.2"/>
<httpRuntime maxRequestLength="1048576" />
应该是:
<httpRuntime targetFramework="4.5.2" maxRequestLength="1048576" />
引用 httpRuntime
两次是问题所在。