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

ASP.NET – 使用WCF Web服务绑定w / AD组的IIS7部署错误500 24 5

发布时间:2020-12-16 07:34:01 所属栏目:asp.Net 来源:网络整理
导读:背景:在部署在本地计算机上无错误编译的应用程序后,我收到内部服务器500 24 50错误.部署应用程序的服务器具有大量安全性并且运行IIS 7.5,因此我需要为每个目录指定读写访问权限.此应用程序使用 Windows身份验证和Web服务通过代理填充下拉框.我认为连接到Web
背景:在部署在本地计算机上无错误编译的应用程序后,我收到内部服务器500 24 50错误.部署应用程序的服务器具有大量安全性并且运行IIS 7.5,因此我需要为每个目录指定读写访问权限.此应用程序使用 Windows身份验证和Web服务通过代理填充下拉框.我认为连接到Web服务可能存在问题,或者文件的读/写安全性问题,或者活动目录身份验证存在问题.

由于某种原因,Internet Explorer刚刚显示无法加载网页错误.

Google Chrome中出错:

500 – Internal Server Error.
 There is a problem with the resource you are looking for,and it cannot be displayed.

日志文件详情:

#Software: Microsoft Internet Information Services 7.5
 #Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken

 2011-05-18 13:54:46 W3SVC1 FL-TPA-WEB-01 172.17.1.25 GET / - 80 - 
 172.17.1.25 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+WOW64;
 +Trident/4.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET4.0C;+.NET4.0E) - -
 invitations.myagencyservices.com 500 24 50 1380 368 15

MSDN将错误定义为http://support.microsoft.com/kb/943891:

500.24 - An ASP.NET impersonation configuration does not apply in Managed 
           Pipeline mode.

Web.Config代码:

<system.web>
  <customErrors mode="Off" ></customErrors>
  <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
  <trace enabled="true" pageOutput="true" />


  <authentication mode="Windows"/> 
  <identity impersonate="true"/>  

    <authorization>          
    <allow users="algbmccarthy,algphoward" />               
    <allow roles="algACOMP_USER_ADMIN" />
    <allow roles="algACOMP_user_AMG" />
    <allow roles="algACOMP_user_BIG" />
    <allow roles="algACOMP_user_NIS" />
    <allow roles="algACOMP_user_GLA" />
    <allow roles="algACOMP_user_PIP" />
    <allow roles="algACOMP_user_PSM" />
    <allow roles="algACOMP_user_PAM" />
    <allow roles="algACOMP_user_ANN" />
    <allow roles="algACOMP_user_AAM" />
    <allow roles="algACOMP_user_MWM" /> 
    <allow roles="algACOMP_user_GIM" />
    <deny users="*" />      
  </authorization> 
  </system.web>

  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>

  <system.serviceModel>
    <bindings>
    <basicHttpBinding>
    <binding name="BasicHttpBinding_IAcompService1" closeTimeout="00:01:00"
      openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
      allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
      maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
      messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
      useDefaultWebProxy="true">
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None"
          realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
        </security>
      </binding>
   </basicHttpBinding>
  </bindings>

    <client>
        <endpoint address="http://63.236.108.91/aCompService.svc" binding="basicHttpBinding"
    bindingConfiguration="BasicHttpBinding_IAcompService1" contract="aComp_ServiceReference.IAcompService"
    name="BasicHttpBinding_IAcompService1" />
    </client>
  </system.serviceModel>

任何建议都将被投票!
谢谢你的期待!

解决方法

发生500.24.50错误是因为ASP.NET集成模式无法模拟BeginRequest和AuthenticateRequest管道阶段中的请求标识.如果您的应用程序在集成模式下运行,则声明500.24,未声明validateIntegratedModeConfiguration或设置为true,并且您的应用程序将标识模拟设置为true.

解决方法

答:如果您的应用程序不依赖于在BeginRequest和AuthenticateRequest阶段模拟请求用户(在集成模式下无法模拟的唯一阶段),请通过将以下内容添加到应用程序的web.config来忽略此错误:

<system.webServer>
          <validation validateIntegratedModeConfiguration="false" />
  </system.webServer>

B.如果您的应用程序确实依赖于BeginRequest和AuthenticateRequest中的模拟,或者您不确定,请转到经典模式.

C.从web.config中删除无论如何都无法在集成模式下生效

阅读更多Breaking Changes in IIS 7 from LEARN.IIS.NET

(编辑:李大同)

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

    推荐文章
      热点阅读