[英]ASP.NET - IIS7 Deployment Error 500 24 50 using WCF Web Service Binding w/ AD Groups
背景:在部署在本地计算机上无错误编译的应用程序后,我收到内部服务器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="alg\bmccarthy, alg\phoward" />
<allow roles="alg\ACOMP_USER_ADMIN" />
<allow roles="alg\ACOMP_user_AMG" />
<allow roles="alg\ACOMP_user_BIG" />
<allow roles="alg\ACOMP_user_NIS" />
<allow roles="alg\ACOMP_user_GLA" />
<allow roles="alg\ACOMP_user_PIP" />
<allow roles="alg\ACOMP_user_PSM" />
<allow roles="alg\ACOMP_user_PAM" />
<allow roles="alg\ACOMP_user_ANN" />
<allow roles="alg\ACOMP_user_AAM" />
<allow roles="alg\ACOMP_user_MWM" />
<allow roles="alg\ACOMP_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中删除无论如何都无法在集成模式下生效
更新:
做了一点挖掘,你实际上错误配置了服务。 此MSDN文章介绍了如何为Windows身份验证配置basicHttpBinding。 基本上,basicHttpBinding元素需要如下所示:
<basicHttpBinding>
<binding name="BasicHttpEndpointBinding">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>
原始答案:
以下是本文中的信息。 由于您的服务使用模拟进行授权,因此您似乎需要使用AppPool的ASP.NET 经典模式管道配置来进行此服务。 您可能想要研究新的集成模式管道中如何支持模拟,并了解您的服务无法满足它的原因,因为首选集成模式。
您将收到500 - 内部服务器错误。 这是HTTP错误500.24:检测到的ASP.NET设置不适用于集成管理管道模式。 发生这种情况是因为ASP.NET集成模式无法在BeginRequest和AuthenticateRequest管道阶段模拟请求标识。 解决方法
B.如果您的应用程序确实依赖于BeginRequest和AuthenticateRequest中的模拟,或者您不确定,请转到经典模式。
重要说明:确保已在计算机上安装了ASP.NET; 如果没有或有疑问,请运行以下命令:
> c:\Windows\Microsoft.NET\Framework\vX.X.XXXXX\aspnet_regiis.exe /i
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.