远程服务器 HTTP 500 错误配置问题

HTTP 500 发生的原因有很多种,可以根据HTTP状态代码进行判定。如


HTTP 500 �C 内部服务器错误
HTTP 500.100 �C 内部服务器错误 �C ASP 错误
HTTP 500.11 服务器关闭
HTTP 500.12 应用程序重新启动
HTTP 500.13 �C 服务器太忙
HTTP 500.14 �C 应用程序无效
HTTP 500.15 �C 不允许请求 global.asa

根据以上的状态码,可以判定问题出现的可能原因。

开发环境:VS2012

数据库:SQL Server 2008

场景:部署在ASP.NET虚拟主机上

一般来说,代码出现问题的可能性不大,在测试过功能能够满足要求正常使用之后,如果还是出现500的错误。考虑是否是以下原因:

程序在本地系统测试正常,但是部署到远程服务器上,访问aspx页面,就会出现HTTP 500 错误。


<connectionStrings configProtectionProvider="RsaProtectedConfigurationProvider">
    <EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns="http://www.w3.org/2001/04/xmlenc#">
      <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
      <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
        <EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">
          <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
          <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
            <KeyName>Rsa Key</KeyName>
          </KeyInfo>
          <CipherData>
            <CipherValue>data</CipherValue>
          </CipherData>
        </EncryptedKey>
      </KeyInfo>
      <CipherData>
        <CipherValue>data</CipherValue>
      </CipherData>
    </EncryptedData>
  </connectionStrings>

经检查发现,是由于在配置文件中使用了上述的连接字符串 加密处理配置节,远程服务器端IIS可能不支持该配置节,导致500错误。 去掉此配置节后,网站即可正常工作。


你可能感兴趣的:(数据库,配置,服务器,应用程序,虚拟主机)