Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provisioning doesn't work when myhost on non-standard port #76

Open
acou1304 opened this issue Jul 19, 2021 · 1 comment
Open

Provisioning doesn't work when myhost on non-standard port #76

acou1304 opened this issue Jul 19, 2021 · 1 comment

Comments

@acou1304
Copy link

I've seen this error reported a couple of years ago, where on line 3298 of AutoSPInstallerModule.psm1 it throws an exception because the $mySiteAppPool variable is not primed. Fundamentally, (apart from the missing variable) the script is looking to see if the MySite web application exists. The problem is that it doesn't append the ':' at the end if the port number is not 80 or 443.
$getSPWebApplication = Get-SPWebApplication -Identity $mySiteURL -ErrorAction SilentlyContinue
If ($null -eq $getSPWebApplication -and ($mySiteWebApp))
{
Write-Host -ForegroundColor White " - Creating Web App "$mySiteName"..."
New-SPWebApplication -Name $mySiteName -ApplicationPoolAccount $($mySiteAppPoolAcct.username) -ApplicationPool $mySiteAppPool -DatabaseServer $mySiteDBServer -DatabaseName $mySiteDB -Url $mySiteURL -Port $mySitePort -SecureSocketsLayer:$mySiteUseSSL @hostHeaderSwitch @pathSwitch @databaseCredentialsParameter | Out-Null
}

Line 3294 will fail because the URL passed in is something like http://mysite instead of http://mysite:1280 (where the port number is 1280 for example).

@VACoder
Copy link

VACoder commented Jun 25, 2024

This is an issue in June 2024 as well except that it fails on 3635. MySiteHost is set to 8081 in my setup script:

Creating Web App "MySite Host"...
New-SPWebApplication : Cannot bind argument to parameter 'ApplicationPool' because it is null.
At C:\Temp\AutoSPInstaller\SP\Automation\AutoSPInstallerModule.psm1:3635 char:132

  • ... ($mySiteAppPoolAcct.username) -ApplicationPool $mySiteAppPool -Databa ...

  •                                                ~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [New-SPWebApplication], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.SharePoint.PowerShell.SPCmdletN
      ewSPWebApplication

    Right above the failing new-SPWebApplicatoin command I paste din this information
    $mySiteAppPool = "MySites";
    $mySitePort = "8081";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants