[英]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.