We applied Transient Fault Handling Block for our web role of cloud service, we even didn't write one single line code. When we try to debug our cloud service locally, the exception would show on webpage, like this:
我们为我们的云服务的Web角色应用了瞬态故障处理块,我们甚至没有编写一个单行代码。当我们尝试在本地调试我们的云服务时,会在网页上显示异常,如下所示:
The path is too long after being fully qualified. Make sure the full path is less than 260 characters and the directory name is less than 248 characters.
完全合格后路径太长。确保完整路径少于260个字符,目录名称少于248个字符。
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
描述:执行当前Web请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。
Exception Details: System.IO.FileLoadException: The path is too long after being fully qualified. Make sure the full path is less than 260 characters and the directory name is less than 248 characters.
异常详细信息:System.IO.FileLoadException:完全限定后路径太长。确保完整路径少于260个字符,目录名称少于248个字符。
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus' could not be loaded.
程序集加载跟踪:以下信息有助于确定无法加载程序集“Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus”的原因。
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/AzureCloudService2/WebRole1/
LOG: Initial PrivatePath = C:\AzureCloudService2\WebRole1\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\AzureCloudService2\WebRole1\web.config
LOG: Using host configuration file: C:\Program Files\IIS Express\config\templates\PersonalWebServer\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/<user>/AppData/Local/dftmp/Resources/7f758b78-aef1-47f7-ad86-8be56d4218e0/temp/temp/RoleTemp/Temporary ASP.NET Files/root/63defe93/23a6bb89/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.DLL.
LOG: Attempting download of new URL file:///C:/Users/<user>/AppData/Local/dftmp/Resources/7f758b78-aef1-47f7-ad86-8be56d4218e0/temp/temp/RoleTemp/Temporary ASP.NET Files/root/63defe93/23a6bb89/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.DLL.
LOG: Attempting download of new URL file:///C:/AzureCloudService2/WebRole1/bin/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.DLL.
LOG: Using application configuration file: C:\AzureCloudService2\WebRole1\web.config
LOG: Using host configuration file: C:\Program Files\IIS Express\config\templates\PersonalWebServer\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
ERR: Failed to complete setup of assembly (hr = 0x8007006f). Probing terminated.
From the logging, it seems couldn't find Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.dll
in above locations, but actually it indeed located at C:/AzureCloudService2/WebRole1/bin/
, I've checked it many times.
从日志记录中,似乎找不到上面位置的Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.dll,但实际上它确实位于C:/ AzureCloudService2 / WebRole1 / bin /,我已经多次检查过了。
Several information:
- We just install the packages via Nuget
- We also tried other packages such as
TransientFaultHandling.Caching
.etc, all have such problems. - What's interesting is it works fine in worker role
我们只是通过Nuget安装软件包
我们还尝试过其他软件包,如TransientFaultHandling.Caching .etc,都有这样的问题。
有趣的是它在工人角色中运作良好
1 个解决方案
#1
6
@RandyLevy thanks for your comment, it solved my problem. You would win the bounty if you post it as an answer :)
@RandyLevy感谢您的评论,它解决了我的问题。如果你把它作为答案发布,你会赢得赏金:)
It looks like the ASP.NET temporary directory is exceeding the max path length. Take a look at Windows Azure - Resolving 'The Path is too long after being fully qualified Error Message' to set the
_CSRUN_STATE_DIRECTORY
environment variable. – Randy Levy看起来ASP.NET临时目录超出了最大路径长度。看一下Windows Azure - 解决'完全限定错误消息后路径太长'来设置_CSRUN_STATE_DIRECTORY环境变量。 - 兰迪·列维
#1
6
@RandyLevy thanks for your comment, it solved my problem. You would win the bounty if you post it as an answer :)
@RandyLevy感谢您的评论,它解决了我的问题。如果你把它作为答案发布,你会赢得赏金:)
It looks like the ASP.NET temporary directory is exceeding the max path length. Take a look at Windows Azure - Resolving 'The Path is too long after being fully qualified Error Message' to set the
_CSRUN_STATE_DIRECTORY
environment variable. – Randy Levy看起来ASP.NET临时目录超出了最大路径长度。看一下Windows Azure - 解决'完全限定错误消息后路径太长'来设置_CSRUN_STATE_DIRECTORY环境变量。 - 兰迪·列维