Abbiamo applicato Transient Fault Block per il nostro ruolo web del servizio cloud, non abbiamo nemmeno scritto un codice a riga singola. Quando proviamo a eseguire il debug del nostro servizio cloud localmente, l'eccezione viene mostrata sulla pagina Web, come ad esempio:Ruolo Web di Azure con eccezione Transient Fault Block Eccezione: il percorso è troppo lungo dopo essere stato completamente qualificato
Il percorso è troppo lungo dopo essere stato pienamente qualificato. Assicurarsi che il percorso completo sia inferiore a 260 caratteri e che il nome della directory sia inferiore a 248 caratteri.
Descrizione: si è verificata un'eccezione non gestita durante l'esecuzione di la richiesta Web corrente. Si prega di rivedere lo stack trace per ulteriori informazioni sull'errore e dove è stato originato nel codice.
Dettagli eccezione: System.IO.FileLoadException: il percorso è troppo lungo dopo essere stato qualificato. Assicurarsi che il percorso completo sia inferiore a 260 caratteri e che il nome della directory sia inferiore a 248 caratteri.
Assemblea carico Trace: Le seguenti informazioni possono essere utili per determinare perché l'assemblea 'Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus' non potrebbe essere caricato.
=== 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.
Dalla registrazione, sembra che non riusciva a trovare Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.dll
in luoghi di cui sopra, ma in realtà è in effetti trova a C:/AzureCloudService2/WebRole1/bin/
, ho controllato molte volte.
Diversi informazioni:
- Abbiamo appena installare i pacchetti tramite Nuget
- Abbiamo provato anche altri pacchetti come
TransientFaultHandling.Caching
.ecc, tutti hanno questi problemi. - La cosa interessante è che funziona bene nel ruolo di lavoratore
Sembra che la directory temporanea ASP.NET stia superando la lunghezza massima del percorso. Date un'occhiata a [Windows Azure - Risoluzione 'Il percorso è troppo lungo dopo essere stato completamente qualificato Messaggio di errore'] (http://blogs.msdn.com/b/jnak/archive/2010/01/14/windows-azure- path-too-long.aspx) per impostare la variabile di ambiente _CSRUN_STATE_DIRECTORY. –