Quantcast
Channel: AutoSPInstaller
Viewing all articles
Browse latest Browse all 2279

Commented Issue: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.IIS.PowerShell.Framework' [19696]

$
0
0
I ran into the issue below last night setting up SP2013 on a new Win2008 R2 SP1 machine (everything on one box, except for DBs). I tried rebooting and re-running the script but it halted at the same point.

```
- Waiting for Central Admin site...Online
- Updating Central Admin branding text to "Dev"...
- Installing Application Content...
--------------------------------------------------------------
- Script halted!


Exception : System.IO.FileNotFoundException: Could not load file
or assembly 'Microsoft.IIS.PowerShell.Framework' or
one of its dependencies. The system cannot find the
file specified.
File name: 'Microsoft.IIS.PowerShell.Framework'
at
System.Reflection.RuntimeAssembly._nLoad(AssemblyName
fileName, String codeBase, Evidence assemblySecurity,
RuntimeAssembly locationHint, StackCrawlMark&
stackMark, IntPtr pPrivHostBinder, Boolean
throwOnFileNotFound, Boolean forIntrospection, Boolean
suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.LoadWithPartial
NameInternal(AssemblyName an, Evidence
securityEvidence, StackCrawlMark& stackMark)
at Microsoft.IIs.PowerShell.Framework.Interop.IAppHo
stElement.get_Properties()
at Microsoft.IIs.PowerShell.Framework.ConfigurationE
lement.get_Attributes()
at Microsoft.IIs.PowerShell.Framework.ConfigurationE
lement.ToPSObject(ConfigurationElement parent)
at Microsoft.IIs.PowerShell.Framework.ConfigurationE
lement.ToPSObject(ConfigurationElement parent)
at Microsoft.IIs.PowerShell.Framework.ConfigurationE
lement.ToPSObject(ConfigurationElement parent)
at Microsoft.IIs.PowerShell.Provider.GetWebsiteComma
nd.WriteSite(ConfigurationInfo o)
at Microsoft.IIs.PowerShell.Framework.Configuration.
XPathQueryToStream(String query, PipelineStreamWriter
writer)
at System.Management.Automation.CommandProcessor.Pro
cessRecord()

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].

TargetObject :
CategoryInfo : NotSpecified: (:) [Get-Website], FileNotFoundException
FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.IIs.PowerShel
l.Provider.GetWebsiteCommand
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at ConfigureFarm, C:\software\AutoSPInstaller\v3\SP\Aut
oSPInstaller\AutoSPInstallerFunctions.ps1: line 1466
at Setup-Farm, C:\software\AutoSPInstaller\v3\SP\AutoSP
Installer\AutoSPInstallerMain.ps1: line 185
at <ScriptBlock>, C:\software\AutoSPInstaller\v3\SP\Aut
oSPInstaller\AutoSPInstallerMain.ps1: line 358
at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails :
```

I did a quick google and came across http://chuvash.eu/2013/04/20/autospinstaller-error-while-stopping-the-default-web-site-in-iis. In his case, his default website was stopped.. however mine was started. Regardless, used his suggestion and updated the AutoSPInstallerFunctions.ps1 file with the try/catch statement below and that seemed to resolve it:

```
#Region Stop Default Web Site
# Added to avoid conflicts with web apps that do not use a host header
# Thanks to Paul Stork per http://autospinstaller.codeplex.com/workitem/19318 for confirming the Stop-Website cmdlet
ImportWebAdministration
Try{
$defaultWebsite = Get-Website | Where-Object {$_.Name -eq "Default Web Site" -or $_.ID -eq 1 -or $_.physicalPath -eq "%SystemDrive%\inetpub\wwwroot"} # Try different ways of identifying the Default Web Site, in case it has a different name (e.g. localized installs)
} Catch [System.IO.FileNotFoundException]{
$defaultWebsite = Get-Website | Where-Object {$_.Name -eq "Default Web Site" -or $_.ID -eq 1 -or $_.physicalPath -eq "%SystemDrive%\inetpub\wwwroot"}
Break
}
```

Just passing this along in case anyone else runs across it, and maybe it could be worked into the next update. Thanks as always for providing such a great project!

Andy
Comments: ** Comment from web user: grohoskek **

I resolved this issue by manually stopping the default site. The script then completed successfully.


Viewing all articles
Browse latest Browse all 2279

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>