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

Commented Unassigned: System.IO.FileNotFoundException: Could not load file [19985]

$
0
0
I'm running a script to build a development environment across two virtual systems.

The script ran fine until after three of the databases had been created a,t which point the script crashed with a user exception error. This simply turned out to be a missing password for the search application, however since then it's crashed with the following error and I've been unable to find a solution to it.

Please could someone help:

Here's the error:

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.ConfigurationElement.get_Attributes()
at Microsoft.IIs.PowerShell.Framework.ConfigurationElement.ToPSObject(ConfigurationElement parent)
at Microsoft.IIs.PowerShell.Framework.ConfigurationElement.ToPSObject(ConfigurationElement parent)
at Microsoft.IIs.PowerShell.Framework.ConfigurationElement.ToPSObject(ConfigurationElement parent)
at Microsoft.IIs.PowerShell.Provider.GetWebsiteCommand.WriteSite(ConfigurationInfo o)
at Microsoft.IIs.PowerShell.Framework.Configuration.XPathQueryToStream(String query, PipelineStreamWriter
writer) at System.Management.Automation.CommandProcessor.ProcessRecord()

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 :
vocationInfo : System.Management.Automation.InvocationInfo
riptStackTrace : at ConfigureFarm, C:\AutoSPInstaller\SP\AutoSPInstaller
\AutoSPInstallerFunctions.ps1: line 1480
at Setup-Farm, C:\AutoSPInstaller\SP\AutoSPInstaller\Au
toSPInstallerMain.ps1: line 185
at <ScriptBlock>, C:\AutoSPInstaller\SP\AutoSPInstaller
\AutoSPInstallerMain.ps1: line 358
at <ScriptBlock>, <No file>: line 1

Thanks
Comments: ** Comment from web user: IvanJosipovic **

This looks like a timing issue. I resolved this quickly by calling ImportWebAdministration multiple times as a test.

Example
```
#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
ImportWebAdministration
ImportWebAdministration
$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)
Write-Host -ForegroundColor White " - Checking $($defaultWebsite.Name)..." -NoNewline
if ($defaultWebsite.State -ne "Stopped")
{
Write-Host -ForegroundColor White "Stopping..." -NoNewline
$defaultWebsite | Stop-Website
if ($?) {Write-Host -ForegroundColor White "Done."}
}
else {Write-Host -ForegroundColor White "Already stopped."}
#EndRegion
Write-Host -ForegroundColor White " - Done initial farm/server config."
WriteLine
}
```


Viewing all articles
Browse latest Browse all 2279

Trending Articles