2012-07-31 13 views
8

मेरे पास एक बहु-स्तरीय एज़ूर एप्लिकेशन है जिस पर मैं काम कर रहा हूं। यह एक एमवीसी फ्रंट एंड के साथ-साथ एज़ूर एसक्यूएल और टेबल स्टोरेज के पीछे वेब और कार्यकर्ता भूमिकाओं का उपयोग करता है। यह एमुलेटर और क्लाउड में थोड़ी देर के लिए अच्छी तरह से काम कर रहा है।'माइक्रोसॉफ्ट.WindowsAzure.Configuration' से संबंधित 'फ़ाइल या असेंबली लोड नहीं कर सका' त्रुटि का कारण क्या होगा?

मैं सिर्फ यह करने के लिए कुछ सेवा बस कार्यक्षमता जोड़ने शुरू कर दिया है, NuGet से सेवा बस पैकेज जोड़ने, और अब मुझे लगता है कि हालांकि अभी भी सब कुछ संकलित, मैं निम्नलिखित रनटाइम त्रुटि हो रही है:

Server Error in '/' Application. 
Could not load file or assembly 'Microsoft.WindowsAzure.Configuration' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) 
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.Configuration' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) 

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.Configuration' could not be loaded. 


=== Pre-bind state information === 
LOG: User = JCFXLAPTOP\User 
LOG: DisplayName = Microsoft.WindowsAzure.Configuration 
(Partial) 
WRN: Partial binding information was supplied for an assembly: 
WRN: Assembly Name: Microsoft.WindowsAzure.Configuration | 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:///D:/Work/CLIENTS/PageEngine/Solutions/PageEngine/Web.PageEngine/ 
LOG: Initial PrivatePath = D:\Work\CLIENTS\PageEngine\Solutions\PageEngine\Web.PageEngine\bin 
Calling assembly : (Unknown). 
=== 
LOG: This bind starts in default load context. 
LOG: Using application configuration file: D:\Work\CLIENTS\PageEngine\Solutions\PageEngine\Web.PageEngine\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:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/4904ccbc/14659c77/Microsoft.WindowsAzure.Configuration.DLL. 
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/4904ccbc/14659c77/Microsoft.WindowsAzure.Configuration/Microsoft.WindowsAzure.Configuration.DLL. 
LOG: Attempting download of new URL file:///D:/Work/CLIENTS/PageEngine/Solutions/PageEngine/Web.PageEngine/bin/Microsoft.WindowsAzure.Configuration.DLL. 
LOG: Using application configuration file: D:\Work\CLIENTS\PageEngine\Solutions\PageEngine\Web.PageEngine\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.WindowsAzure.Configuration, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 
ERR: Failed to complete setup of assembly (hr = 0x80131045). Probing terminated. 


Stack Trace: 


[FileLoadException: Could not load file or assembly 'Microsoft.WindowsAzure.Configuration' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)] 

[FileLoadException: Could not load file or assembly 'Microsoft.WindowsAzure.Configuration, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)] 
    System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0 
    System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +210 
    System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +242 
    System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +17 
    System.Reflection.Assembly.Load(String assemblyString) +35 
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +122 

[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.WindowsAzure.Configuration, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)] 
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +12731430 
    System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +503 
    System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +142 
    System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +334 
    System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath) +203 
    System.Web.Compilation.BuildManager.ExecutePreAppStart() +152 
    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1151 

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.WindowsAzure.Configuration, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)] 
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12847312 
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159 
    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12675965 

मैंने देखा कि सर्विसबस NuGet पैकेज Microsoft.WindowsAzure.Configuration dll (1.7.0.2) का एक नया संस्करण संदर्भित करता है, और सोचता है कि यह कारण हो सकता है। मैंने इसे ओवरराइड करने और सभी संदर्भों को या तो 1.7.0.0 या 1.7.0.2 में बदलने की कोशिश की है - न तो मदद मिली है। मैंने समाधान से सभी एज़ूर संदर्भों को हटाने और NuGet संकुल को स्थापित करके और नवीनतम एसडीके का संदर्भ देकर संदर्भों को दोबारा जोड़ने का भी प्रयास किया है। इससे या तो मदद नहीं मिली है।

मुझे यह भी जोड़ना चाहिए कि माइक्रोसॉफ्ट.WindowsAzure.Configuration dll एमवीसी अनुप्रयोग के बिन फ़ोल्डर में रहा है, और यह हमेशा CopyLocal को सत्य पर सेट किया गया है।

मुझे लगता है कि Azure कॉन्फ़िगरेशन NuGet पैकेज हाल ही में अपडेट किया गया था (शुक्रवार 27 जुलाई), और मुझे आश्चर्य है कि इसके साथ कुछ करने के लिए क्या हो सकता है।

क्या कोई जानता है कि समस्या क्या हो सकती है?

संपादित

बस पुष्टि करते हैं कि सेवा बस nuget पैकेज को हटाने से समस्या का समाधान। इसे बहाल करने से समस्या फिर से शुरू हो जाती है। मुझे नहीं पता कि यह मायने रखता है लेकिन माइक्रोसॉफ्ट.WindowsAzure.Configuration dll NuGet पैकेज के हिस्से के रूप में जोड़ा गया एक असंगत संस्करण संख्या प्रतीत होता है। जबकि पथ से पता चलता है कि संस्करण 1.7.0.2:

डी: \ वर्क \ क्लाइंट \ पेजइंजिन \ समाधान \ पृष्ठइंजिन \ पैकेज \ Microsoft.WindowsAzure.ConfigurationManager होना चाहिए। 1.7.0.2 \ lib \ net35-पूर्ण \ Microsoft.WindowsAzure.Configuration.dll

... गुण निरीक्षक में संस्करण संख्या अभी भी 1.7.0.0

उत्तर

4

यह Microsoft.WindowsAzure.Configuration विधानसभा के साथ कोई समस्या, संस्करण 1.7.0.2

अस्थायी रूप से या तो 1.7.0.1 या 1.7.0.0 और फिर स्थायी रूप से 1.7.0.3

3

था एक ही समस्या है। मैंने माइक्रोसॉफ्ट को वापस कर दिया। WindowsAzure.ConfigurationManager वापस NuGet संस्करण 1.7.0.1 पर। अब यह ठीक काम कर रहा है।

+0

में तय करने के लिए वापस रोलिंग द्वारा तय था जवाब देने में व़क्त लेने के लिए शुक्रिया। मैंने NuGet से नवीनतम सर्विस बस पैकेज प्राप्त करके और फिर सभी संदर्भों को 1.7.0.2 पर हटाकर मैन्युअल रूप से 1.7.0.0 का संदर्भ दिया। मैं सवाल लाइव छोड़ दूंगा हालांकि मैं देखना चाहता हूं कि समुदाय में कोई भी कह सकता है कि यह क्यों हो रहा है। – JcFx

+0

यहां एक ही समस्या है। 1.7.0.1 ठीक काम करता है। –

+3

धन्यवाद - इस बीच टीम इस में देख रही है। बहुत अफसोस! –

संबंधित मुद्दे