共用方式為


Team Foundation Server Proxy 疑難排解

更新:2007 年 11 月

本主題將列出下列您在使用 Team Foundation Server Proxy 和應用程式層時可能會發生的常見問題。

  • 當您嘗試存取檔案快取根目錄時發生 UnauthorizedAccessException

  • Proxy 服務帳戶密碼逾期所導致的 AccessDenied 例外狀況

  • 當您嘗試啟動 QueryProxyStatistics webmethod 時發生 InvalidOperationException

  • 當您嘗試產生新的私密金鑰時發生 CryptographicException

如果您在檢閱這些秘訣和個別錯誤訊息說明主題中的秘訣之後仍無法解決問題,請造訪 Visual Studio Team System 的 Microsoft 技術論壇 (https://go.microsoft.com/fwlink/?LinkId=54490) (英文)。這些論壇會提供可搜尋的文章主題,其中有各式各樣的疑難排解主題,並且派有專人監看,以便為您的問題提供快速的回應。

當您嘗試存取檔案快取根目錄時發生 UnauthorizedAccessException

如果您嘗試存取 CacheRoot 資料夾,可能會在 Proxy 伺服器的事件記錄檔中發現下列 (或類似的) 錯誤訊息:

TF53010: Team Foundation 元件中發生未預期的狀況。

您應該將包含在這裡的資訊提供給站台管理人員。

技術資訊 (供系統管理員參考):

例外狀況訊息: 拒絕存取路徑 'C:\Program Files\Microsoft Team Foundation 2005\Web Services\VersionControlProxy\Data\00000000-0000-0000-0000-000000000000\00'。(型別 UnauthorizedAccessException)

例外狀況堆疊追蹤:

於 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

於 System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity dirSecurity)

於 System.IO.DirectoryInfo.Create(),

當 Proxy 服務帳戶沒有存取快取根資料夾所需的正確使用權限時,就會發生這項錯誤。若要更正此錯誤,請確認 Proxy 服務帳戶對快取根資料夾的 [讀取] 和 [寫入] 權限已設定為 [允許]。

Proxy 服務帳戶密碼逾期所導致的 AccessDenied 例外狀況

如果 Proxy 服務帳戶的密碼已逾期,而且 Proxy 服務嘗試從應用程式層下載檔案,此時就會傳回下列錯誤:

詳細訊息: ErrorDownloadingFromAppTier

例外狀況訊息: <html><head><title>Error</title></head><body>錯誤: 存取被拒絕。</body></html>(型別 ProxyException)

例外狀況堆疊追蹤:

於 Microsoft.TeamFoundation.VersionControl.Server.Proxy.ProxyRepository.GetDownloadResponse(String downloadUrl)

於 Microsoft.TeamFoundation.VersionControl.Server.Proxy.CacheMissDownloadStatus.StartDownload()

於 Microsoft.TeamFoundation.VersionControl.Server.Proxy.CacheMissWriter.PerformDownload(Object stateInfo)

錯誤: 存取被拒絕

若要避免這個問題發生,請使用指令碼來通知密碼逾期的情況。在服務受到影響之前,您應該透過更新服務帳戶密碼,回應這些通知。如需這種指令碼的範例,請參閱<Microsoft Developer Network 技術文件>(https://go.microsoft.com/fwlink/?LinkId=69960) (英文)。

當您嘗試啟動 QueryProxyStatistics webmethod 時發生 InvalidOperationException

如果您啟動 ProxyStatistics Web 方法,可能會在 Proxy 伺服器的事件記錄檔中看見下列 (或類似的) 錯誤訊息:

System.InvalidOperationException: 無法產生暫存類別 (result=1)。

錯誤 CS2001: 找不到原始程式檔'C:\WINDOWS\TEMP\fxe6fkpm.0.cs'

錯誤 CS2008:未指定輸入

於 System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, CompilerParameters parameters, Evidence evidence)

於 System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, CompilerParameters parameters, Assembly assembly, Hashtable assemblies)

於 System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)

於 System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Evidence evidence)

於 System.Web.Services.Protocols.XmlReturn.GetInitializers(LogicalMethodInfo[] methodInfos)

於 System.Web.Services.Protocols.XmlReturnWriter.GetInitializers(LogicalMethodInfo[] methodInfos)

於 System.Web.Services.Protocols.MimeFormatter.GetInitializers(Type type, LogicalMethodInfo[] methodInfos)

於 System.Web.Services.Protocols.HttpServerType..ctor(Type type)

於 System.Web.Services.Protocols.HttpServerProtocol.Initialize()

於 System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

若要更正此錯誤,請確認 Proxy 服務帳戶對 %WINDIR%\Temp 資料夾的 [讀取]、[讀取與執行] 和 [列出資料夾內容] 權限已設定為 [允許]。

當您嘗試產生新的私密金鑰時發生 CryptographicException

如果 RSACryptoProvider 無法產生新的私密金鑰,您可能會在 Proxy 伺服器的事件記錄檔中看見下列 (或類似的) CryptographicException:

例外狀況:CryptographicException

訊息:金鑰組不存在

堆疊追蹤:

於 System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr)

於 System.Security.Cryptography.SafeProvHandle._FreeCSP(IntPtr pProvCtx)

於 System.Security.Cryptography.SafeProvHandle.ReleaseHandle()

於 System.Runtime.InteropServices.SafeHandle.InternalDispose()

於 System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing)

於 System.Runtime.InteropServices.SafeHandle.Dispose()

於 System.Security.Cryptography.RSACryptoServiceProvider.Dispose(Boolean disposing)

於 System.Security.Cryptography.AsymmetricAlgorithm.System.IDisposable.Dispose()

於 Microsoft.VisualStudio.Hatteras.Util.RequestSignatures.GenerateNewPrivateKey(Int32 keyLength)

   於 Microsoft.VisualStudio.VersionControl.Server.AdministrationManager.GenerateRepositoryKey(IPrincipal userPrincipal, Int32 keyLength)

於 Microsoft.VisualStudio.Hatteras.Server.Global.Initialize()

於 Microsoft.VisualStudio.TeamFoundation.Server.TeamFoundationApplication.InitializeInternal()

當 RSACryptoProvider 建立金鑰檔,但是由於使用權限不足而無法刪除此金鑰檔時,就會發生這項錯誤。

注意事項:

這個問題只會在應用程式層上發生。

若要更正此錯誤,請確認 Proxy 服務帳戶對 Documents and Settings 資料夾的 RSA 電腦金鑰資料夾 (例如,C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA) 的 [完全控制] 權限已設定為 [允許]。

請參閱

概念

管理對 Team Foundation Server Proxy 的遠端連接

Team Foundation Server Proxy Web.Config 檔設定