none
Problema com a referencia da dll Microsoft.WindowsAzure.StorageClient RRS feed

  • Pergunta

  • Após uma atualização do Azure SDK passei a ter o problema abaixo: O que faço para resolve-lo?

    Server Error in '/' Application.

    Could not load file or assembly 'Microsoft.WindowsAzure.StorageClient' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

    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. 

    Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.WindowsAzure.StorageClient' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

    Source Error: 
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.WindowsAzure.StorageClient' could not be loaded.
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    

    Stack Trace: 
    [FileLoadException: Could not load file or assembly 'Microsoft.WindowsAzure.StorageClient' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
    
    [FileLoadException: Could not load file or assembly 'Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
       System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
       System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +567
       System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +192
       System.Reflection.Assembly.Load(String assemblyString) +35
       System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +123
    
    [ConfigurationErrorsException: Could not load file or assembly 'Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
       System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +11568256
       System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +485
       System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +79
       System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +337
       System.Web.Compilation.BuildManager.CallPreStartInitMethods() +280
       System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1167
    
    [HttpException (0x80004005): Could not load file or assembly 'Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11700992
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4869221
    


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

    quinta-feira, 3 de maio de 2012 12:21

Respostas

  • Olá pessoal! Encontrei uma solução para o problema descrito acima. Mas como não sei se a minha solução é a mais adequada então vou deixar o post aberto para que outros possam colocar outras soluções.

    Eu resolvi este problema apagando os arquivos temporários das pastas:

    C:\Windows\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files
    C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
    C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
    C:\Users\ricksam\AppData\Local\Temp\Temporary ASP.NET Files

    Mas aparentemente a pasta que foi essencial ter apagado para o meu caso foi "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files" devido o meu sistema operacional ser 64 bits

    • Marcado como Resposta Rick Sam quinta-feira, 3 de maio de 2012 13:19
    quinta-feira, 3 de maio de 2012 13:19