症狀
請考慮以下案例:
- 您的電腦執行的是 Windows 7 或 Windows Server 2008 R2。
- 電腦正在執行 Windows Communication Foundation (WCF) 服務,而且該服務託管在 Internet Information Services (IIS) 上。 此服務使用 HTTP 或 HTTPS 通訊協定,並使用 Windows 驗證。
- 您安裝了一些用於 WCF 的 Microsoft .NET Framework 3.0 Service Pack 2 或 .NET Framework 3.5 Service Pack 1 更新。 例如,安裝安全性更新 2756920。
在此案例中,您可能會在所要求的頁面上收到類似下列的例外狀況錯誤訊息:
注意
'/SecurtyTokenServiceApplication' 應用程式中發生伺服器錯誤
找不到方法:'System.String
System.ServiceModel.Ativation.iis7helper.extendedprotectiondotlessspnnotenabledthrowhelper (system.object) '
例如,當您前往 Microsoft SharePoint 2010 網站時,可能會收到錯誤訊息。
發生此問題時,您可能也會在伺服器的事件記錄檔中收到下列錯誤訊息:
注意
WebHost 無法處理要求。
寄件者資訊: System.ServiceModel.ServiceHostingEnvironment+HostingManager/17653682
例外狀況: System.ServiceModel.ServiceActivationException: 服務 '/SecurityTokenServiceApplication/securitytoken.svc' 無法啟動,因為在編譯期間發生例外狀況。
例外狀況訊息為: 找不到方法: 'System.String System.ServiceModel.Activation.Iis7Helper.ExtendedProtectionDotlessSpnNotEnabledThrowHelper (System.Object) '.。 --->
System.MissingMethodException: 找不到方法: 'System.String System.ServiceModel.Activation.Iis7Helper.ExtendedProtectionDotlessSpnNotEnabledThrowHelper (System.Object) '。
位於 System.ServiceModel.WasHosting.MetabaseSettingsIis7V2.WebConfigurationManagerWrapper.BuildExtendedProtectionPolicy (ExtendedProtectionTokenChecking tokenChecking、ExtendedProtectionFlags flags、List'1 spnList)
位於 System.ServiceModel.WasHosting.MetabaseSettingsIis7V2.WebConfigurationManagerWrapper.GetExtendedProtectionPolicy (ConfigurationElement)
位於 System.ServiceModel.WasHosting.MetabaseSettingsIis7V2.ProcessWindowsAuthentication (字串 siteName, 字串 virtualPath, HostedServiceTransportSettings& transportSettings)
原因
發生此問題的原因是電腦可能安裝了一些只包含 System.ServiceModel.dll 而不包含 System.ServiceModel.WasHosting.dll 的 Hotfix。 請參閱「更多資訊」一節,取得已知只包含這些檔案的 Hotfix 清單。
由於此問題,較新的更新無法安裝這兩個檔案的相同版本。 這會公開兩個檔案之間的相依性。 這反過來又會導致前面提到的異常。 發生此問題是因為先前發行的 Hotfix 中的問題,並非特別由新更新造成。 新的更新只會使問題浮出水面。
解決方式
若要解決此問題,請確定 System.ServiceModel.dll 和 System.ServiceModel.WasHosting.dll 版本同步處理。
若要解決此問題,請安裝更新 [2637518] (/kb/2637518semblies。
建議您安裝更新 [2637518] (/kb/2637518o 只修正本文所述的問題。 僅將此 Hotfix 套用至發生此特定問題的系統。
要從 Microsoft 下載中心下載此 Hotfix,請轉到以下 Microsoft 下載中心網頁:
http://go.microsoft.com/fwlink/?LinkID=242859 注意:如果您已經遇到此問題,請安裝更新 [2637518] (/kb/2637518issue 到 Surface。
重新啟動需求
套用此更新後,您可能須重新啟動電腦。
狀態
Microsoft 已確認這是「適用對象」一節中列出的 Microsoft 產品中的問題。
更多資訊
如果下列 Hotfix 安裝在執行 Windows 7 或 Windows Server 2008 R2 RTM 的電腦上,並且未安裝適用於 WCF 的新 .NET Framework 3.5 SP1 更新,則可能會導致此問題。 如需詳細資訊,請按一下下面的文章編號,檢視「Microsoft 知識庫」中的文章:
976462 Windows 7 和 Windows Server 2008 R2 已提供 the.NET Framework 3.5 Service Pack 1 的 Hotfix Microsoft Office SharePoint Server 2010
977420 Hotfix 彙總套件可用來修正 Windows 7 和 Windows Server 2008 R2 的 .NET Framework 3.5 SP1 中的 Windows Communication Foundation 問題
在 .NET Framework 3.5 SP1 或 .NET Framework 4 中,由電腦與 NLB 一起託管的 982867 WCF 服務失敗