error trying to load system.web.dll


this line of code:
[reflection.assembly]::loadfile('c:\windows\microsoft.net\framework\v2.0.50727\system.web.dll') | out-null
gives error:
exception calling "loadfile" "1" argument(s): "could not load file or assembly 'system.web, version=2.0.0.0, culture=neutral, pub
lickeytoken=b03f5f7f11d50a3a' or 1 of dependencies. attempt made load program incorrect format."
@ c:\scripts\httptest.ps1:1 char:32
+ [reflection.assembly]::loadfile( <<<<  `

know problem is? how know if i'm missing dependency?

basically, i'm trying follow example:
http://msdn.microsoft.com/en-us/magazine/cc507656.aspx?code=true&level=root&file=harness.ps1

add ability supply user credentials... have asp.net app , i'm looking create few powershell functions perform screen scrapes info.

test if file exists:
ps>test-path "c:\windows\microsoft.net\framework\v2.0.50727\system.web.dll"

can try loading this:
ps>[reflection.assembly]::loadwithpartialname("system.web")

won't latter method, give try @ least.


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Group Policy Event ID 1058 Error Code 1326 (The user name or password is incorrect)

Suspicious event log Event ID: 4905

DCOM received error "2147746132" from...