asp.net - Could not load file or assembly 'System.Management.Automation' -


i've written asp.net mvc 3 web application ('adreporter') on local machine uses powershell retrieve data. if run application locally, works fine. i'm trying run on windows 2008 server when i'm trying access it, following stack trace:

server error in '/adreporter' application.  not load file or assembly 'system.management.automation' or 1 of dependencies. strong name signature not verified.  assembly may have been tampered with, or delay signed not signed correct private key. (exception hresult: 0x80131045)  description: unhandled exception occurred during execution of current web request. please review stack trace more information error , originated in code.   exception details: system.io.fileloadexception: not load file or assembly 'system.management.automation' or 1 of dependencies. strong name signature not verified.  assembly may have been tampered with, or delay signed not signed correct private key. (exception hresult: 0x80131045)  source error:   unhandled exception generated during execution of current web request. information regarding origin , location of exception can identified using exception stack trace below.  assembly load trace: following information can helpful determine why assembly 'system.management.automation' not loaded.  stack trace:    [fileloadexception: not load file or assembly 'system.management.automation' or 1 of dependencies. strong name signature not verified.  assembly may have been tampered with, or delay signed not signed correct private key. (exception hresult: 0x80131045)]  [fileloadexception: not load file or assembly 'system.management.automation, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. strong name signature not verified.  assembly may have been tampered with, or delay signed not signed correct private key. (exception 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.nload(assemblyname filename, string codebase, evidence assemblysecurity, runtimeassembly locationhint, stackcrawlmark& stackmark, intptr pprivhostbinder, boolean throwonfilenotfound, boolean forintrospection, boolean suppresssecuritychecks) +34 system.reflection.runtimeassembly.internalloadassemblyname(assemblyname assemblyref, evidence assemblysecurity, runtimeassembly reqassembly, stackcrawlmark& stackmark, intptr pprivhostbinder, boolean throwonfilenotfound, boolean forintrospection, boolean suppresssecuritychecks) +152 system.reflection.runtimeassembly.internalload(string assemblystring, evidence assemblysecurity, stackcrawlmark& stackmark, intptr pprivhostbinder, boolean forintrospection) +77 system.reflection.runtimeassembly.internalload(string assemblystring, evidence assemblysecurity, stackcrawlmark& stackmark, boolean forintrospection) +16 system.reflection.assembly.load(string assemblystring) +28 system.web.configuration.compilationsection.loadassemblyhelper(string assemblyname, boolean stardirective) +38  [configurationerrorsexception: not load file or assembly 'system.management.automation, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. strong name signature not verified.  assembly may have been tampered with, or delay signed not signed correct private key. (exception hresult: 0x80131045)] system.web.configuration.compilationsection.loadassemblyhelper(string assemblyname, boolean stardirective) +752 system.web.configuration.compilationsection.loadallassembliesfromappdomainbindirectory() +218 system.web.configuration.compilationsection.loadassembly(assemblyinfo ai) +130 system.web.compilation.buildmanager.getreferencedassemblies(compilationsection compconfig) +170 system.web.compilation.buildmanager.getprestartinitmethodsfromreferencedassemblies() +91 system.web.compilation.buildmanager.callprestartinitmethods(string prestartinitlistpath) +258 system.web.compilation.buildmanager.executepreappstart() +135 system.web.hosting.hostingenvironment.initialize(applicationmanager appmanager, iapplicationhost apphost, iconfigmappathfactory configmappathfactory, hostingenvironmentparameters hostingparameters, policylevel policylevel, exception appdomaincreationexception) +516  [httpexception (0x80004005): not load file or assembly 'system.management.automation, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. strong name signature not verified.  assembly may have been tampered with, or delay signed not signed correct private key. (exception hresult: 0x80131045)] system.web.httpruntime.firstrequestinit(httpcontext context) +9873784 system.web.httpruntime.ensurefirstrequestinit(httpcontext context) +101 system.web.httpruntime.processrequestnotificationprivate(iis7workerrequest wr, httpcontext context) +254 


edit
output of assembly binding log viewer:

*** assembly binder log entry  (18/03/2013 @ 11:17:06) ***  operation failed. bind result: hr = 0x80131045. no description available.  assembly manager loaded from:  c:\windows\microsoft.net\framework\v4.0.30319\clr.dll running under executable  c:\windows\syswow64\inetsrv\w3wp.exe --- detailed error log follows.   === pre-bind state information === log: user = iis apppool\asp.net v4.0 log: displayname = system.management.automation (partial) wrn: partial binding information supplied assembly: wrn: assembly name: system.management.automation | domain id: 2 wrn: partial bind occurs when part of assembly display name provided. wrn: might result in binder loading incorrect assembly. wrn: recommended provide specified textual identity assembly, wrn: consists of simple name, version, culture, , public key token. wrn: see whitepaper http://go.microsoft.com/fwlink/?linkid=109270 more information , common solutions issue. log: appbase = file:///c:/inetpub/wwwroot/adreporter/ log: initial privatepath = c:\inetpub\wwwroot\adreporter\bin log: dynamic base = c:\windows\microsoft.net\framework\v4.0.30319\temporary asp.net files\adreporter\96209fa5 log: cache base = c:\windows\microsoft.net\framework\v4.0.30319\temporary asp.net files\adreporter\96209fa5 log: appname = f817618b calling assembly : (unknown). === log: bind starts in default load context. log: using application configuration file: c:\inetpub\wwwroot\adreporter\web.config log: using host configuration file: c:\windows\microsoft.net\framework\v4.0.30319\aspnet.config log: using machine configuration file c:\windows\microsoft.net\framework\v4.0.30319\config\machine.config. log: policy not being applied reference @ time (private, custom, partial, or location-based assembly bind). log: attempting download of new url file:///c:/windows/microsoft.net/framework/v4.0.30319/temporary asp.net files/adreporter/96209fa5/f817618b/system.management.automation.dll. log: attempting download of new url file:///c:/windows/microsoft.net/framework/v4.0.30319/temporary asp.net files/adreporter/96209fa5/f817618b/system.management.automation/system.management.automation.dll. log: attempting download of new url file:///c:/inetpub/wwwroot/adreporter/bin/system.management.automation.dll. log: assembly download successful. attempting setup of file: c:\inetpub\wwwroot\adreporter\bin\system.management.automation.dll log: entering download cache setup phase. log: assembly name is: system.management.automation, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35 log: partially-specified assembly bind succeeded application directory. need re-apply policy. log: using application configuration file: c:\inetpub\wwwroot\adreporter\web.config log: using host configuration file: c:\windows\microsoft.net\framework\v4.0.30319\aspnet.config log: using machine configuration file c:\windows\microsoft.net\framework\v4.0.30319\config\machine.config. log: post-policy reference: system.management.automation, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35 log: gac lookup unsuccessful. err: setup failed hr = 0x80131045. err: failed complete setup of assembly (hr = 0x80131045). probing terminated. 

can please me? looked error days now... in advance!

the problem did not install windows management framework 3.0 on server correctly.

download link: http://www.microsoft.com/en-us/download/details.aspx?id=34595


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -